0
$\begingroup$

The top students in a large high school graduation class are ranked from $1$ (best) to $10$ (tenth best). Assume that each rank is equally likely to be assigned to a male student or a female student. Let $X$ equal the sum of the ranks (from $1$ to $10$) that are assigned to female students, that is if all of the top $10$ students are girls, $X=1+2+3+...+10=55$. Provide the probability function on the sample space.

I believe that the total possible rankings is $2^{10} = 1024$, and I think that $P(X=k)$ is given by the ratio of (ways to get a sum $k$ of ranks assigned to females)/(all possible arrangements). I do not know how to represent the numerator as some type of function.

$\endgroup$
  • $\begingroup$ Thank you, Leucippus, for the edit. $\endgroup$ – Brian Wynne Sep 15 '18 at 1:46
  • $\begingroup$ Are you looking for a closed form formula or just the numbers in this specific case? $\endgroup$ – pepster Sep 15 '18 at 2:40
0
$\begingroup$

Here is a recursive Python function to compute the number of ways to get the sum total using 1,2,...,k

def f(total, k) :
  """ Number of ways to obtain 'total' as a sum of uniqe integers from 1..k """
  if total < 0 or k <= 0:
    return 0
  if 0 <= total <= 1:
    return 1

  if k > total:
    k = total

  return f(total, k-1) + f(total-k, k-1)

so $P(X=k) = \frac{f(k,n)}{2^n}$ ($n=10$ in your case). This kind of formula can be a good first step to validate any proposed closed form formulas.

$\endgroup$
  • $\begingroup$ This was most helpful, pepster, thank you. $\endgroup$ – Brian Wynne Sep 17 '18 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.