# Thread: IRV Probability Question - check my work?

1. ## IRV Probability Question - check my work?

Hi folks. My class (not a probability course) just covered a bunch of probability in one class period. Last prob course I had was in early high school so I'm a little fuzzy on it.

Here's an example we have to work on:
Everyone goes to a party with a gift and gives it to the secret santa, who passes them back to everyone randomly (in a random order). If n people go to the party, what is the expected number of party-goers that will get their own gifts back?

I need to use Indicator Random Variables for this. So here's what I have.

$\mbox {S is a sample space } \\ \mbox {E is an event of S}$

So each person either gets the gift or does not.

SO, first thing's first, I need to identify my IRV C_i

$C_i = \left\{\begin{array}{cc}0, & \mbox{ if they get a real gift } \\1, & \mbox{ if they get back their own gift } \end{array}\right.$

Next, since C is the random variable that represents # of people who got back their own gifts...
$C = \begin{array}{cc}n\\ \sum \\ n=1\end{array} {C_i}$

Then, getting a good gift back is:
$Pr[{C_i}=0] = \frac{1}{2}$
And getting your own gift back is:
$Pr[{C_i}=1] = \frac{1}{2}$

So our expected value of C_i is:
$E[{C_i}] = 0 * Pr[{C_i =0}] + 1 * Pr[{C_i =0}] = 0 * 1 * \frac{1}{2} = \frac{1}{2}$

And finally, the expected value of C is...
$E[C] = E[ (\begin{array}{cc}n\\ \sum \\ i=1\end{array}) {C_i} ]$
$E[C] = \begin{array}{cc}n\\ \sum \\ i=1\end{array} E[{C_i}]$
$E[C] = \begin{array}{cc}n\\ \sum \\ i=1\end{array} \frac{1}{2} = \frac{n}{2}$

(I hope you like my latex, I really tried to learn that for this post. )

So is this right? Any advice? Thanks!

2. I'm not sure what you want me to check.
These 0,1 rvs are called Bernoullis and their sum is a Binomial.
You have a few typos.
C runs from 1 to n.
You accidentally are starting at 0.
O,1,...,n are n+1 terms.
But n/2 is correct.
You want 1,...,n in your sums.
Also that $2^n$ is just weird.
It can't be a lower value since it's greater than n, your upper limit.
You want 1,..,n in your series, all of them.

3. Yeah I was working out the problem a different way and then tried to change it and... the 2^n is from my original solution which I don't think works, sorry about that! (So, it should be n=1 instead of the random 2^n right?)

I'm not sure what you mean that I need 1,...,n in my series though. I'll fix my C starting at 0, thanks! I understand what you mean about that.

4. Your definition of C is still off, It's i=1,...,n.

5. Thanks again, Matheagle. I think I get it now. You're awesome.