# Expected Value/Variance of a Discrete Random Variable

1. Oct 18, 2009

### KingCalc

1. The problem statement, all variables and given/known data
A card is drawn at random from an ordinary deck of 52 cards and its face value is noted, and then this card is returned to the deck. This procedure is done 4 times all together. Let $$X$$ be the total number of aces selected and $$Y = \cos(\pi X/2).$$

$$E[Y] = ?$$

2. Relevant equations

3. The attempt at a solution
Twenty attempts, still no right answer. I've come to the conclusion that I just missed the boat with this one.

2. Oct 18, 2009

### LCKurtz

So X is binomial(4,1/13), right? So you know its discrete probability function p(x) for x = 0 .. 4. And you have $Y = \cos(\pi X/2)$ which I will call f(X). Why not use the formula:

$$E(f(X)) = \sum_{x=0}^4 f(x)p(x)$$

3. Oct 18, 2009

### KingCalc

I guess it's just me being dumb but I really don't get this, even with the formula put right out in front of me.

Edit: I thought it would make sense that I just sum up $$p(1)\times\cos(\pi 1/2)+p(2)\times\cos(\pi 2/2)+p(3)\times\cos(\pi 3/2)+p(4)\times\cos(\pi 4/2)$$

... which (I think) would be...

$$(4/52)(48/52)(48/52)(48/52)\times\cos(\pi 1/2)+(4/52)(4/52)(48/52)(48/52)\times\cos(\pi 2/2)+(4/52)(4/52)(4/52)(48/52)\times\cos(\pi 3/2)+(4/52)(4/52)(4/52)(4/52)\times\cos(\pi 4/2)$$

... but I guess I'm wrong?

Last edited: Oct 18, 2009
4. Oct 18, 2009

### LCKurtz

Am I correct in assuming that you do know the formula for p(x) given that X is a binomial random variable?

p(x) = ?

And the formula for f(x) is given to you. So calculate f(0)p(0) up through f(4)p(4) and add them up.

5. Oct 18, 2009

### KingCalc

Okay I got the answer, even though I don't understand why it works, but I guess I can find that out later. Thanks for the help.