title: Using a shifted bell curve to create random.choices weights
body: <p>I'm a beginner to Python, attempting something a bit too complicated for me.</p>
  <p>I want to output a list (<em>q</em>), <em>k</em>-items long, where each item is one of five options (contained in list <em>w</em>).</p>
  <pre><code>w = [a, b, c, d, e]
  </code></pre>
  <p>I'm using random.choices to create list <em>q</em>.</p>
  <p>I want each item's weighting to be governed by a skewed bell curve (or even a rough approximation of one), where the horizontal position of the curve's peak equals <em>p</em>. <em>p</em> can range from 0.1 to 1.</p>
  <p>So, if <em>p</em> = 0.55, item <em>c</em> should have the highest probability of appearing in list <em>q</em>, with <em>b</em> and <em>d</em> having the second highest probability, and <em>a</em> and <em>e</em> having the lowest probability. If <em>p</em> = 0.1, <em>a</em> should be the most likely to appear and <em>e</em> the least likely, and so on.</p>
  <p>I've found scipy.stats.skewnorm, which seems like it could work. However, I'm really struggling to adapt it into the form I need.</p>
  <p>I'm after a function where 0 ≤ y ≤ 1 and 0 ≤ x ≤ 1.2. I then want this function to create the five weights for random.choices, something like so:</p>
  <pre><code>p = 0.7
  
  prob_a = f(0.2, p)
  
  prob_b = f(0.4, p)
  
  prob_c = f(0.6, p)
  
  etc...
  
  q = random.choices(w, weights=[prob_a, prob_b, prob_c, etc...], k=10)
  </code></pre>
  <p>I'd be extremely grateful for any and all advice, direction, or suggestions! I'm not wedded to either random.choices or skewnorm – if there's a simpler way to achieve a similar result, that'd be amazing!</p>