# Thread: Expected value for dice

1. ## Expected value for dice

If a dice is thrown until we get an even number, what is the expected no. of throws?

Would this be the same as finding the expected value

2. Originally Posted by acevipa
If a dice is thrown until we get an even number, what is the expected no. of throws?

Would this be the same as finding the expected value
Yes, same as expected value. I feel like I've encountered this infinite sum recently, but don't remember how to solve now, although numerically it's not hard to find the value is 2.

There may be a way to solve without infinite sum as well.

I intentionally omitted the sum, so that you can work it out on your own, or say where you got stuck..

Edit: I was able to evaluate the sum by calling the sum L and then computing L + 2L which can be manipulated to 2 + 2L .... but it seems a bit messy.

3. Originally Posted by undefined
Yes, same as expected value. I feel like I've encountered this infinite sum recently, but don't remember how to solve now, although numerically it's not hard to find the value is 2.

There may be a way to solve without infinite sum as well.

I intentionally omitted the sum, so that you can work it out on your own, or say where you got stuck..
I'm actually a bit confused because so far I'm used to working out the expected value of the dice. But it's asking for the expected number of throws

So, would you say, the probability of an even number is 0.5, therefore, the expected number of throws must be 2.

4. Originally Posted by acevipa
I'm actually a bit confused because so far I'm used to working out the expected value of the dice. But it's asking for the expected number of throws
So let X be the random variable: number of throws until even comes up.

E(X) = 1*P(X=1) + 2*P(X=2) + 3*P(X=3) + ...

You should be able to see that P(X=1) = 1/2. What about P(X=2)?

5. Originally Posted by undefined
So let X be the random variable: number of throws until even comes up.

E(X) = 1*P(X=1) + 2*P(X=2) + 3*P(X=3) + ...

You should be able to see that P(X=1) = 1/2. What about P(X=2)?
P(X=2)=0.5

That just tells you the expected value of the dice. But what does it say about the expected no. of throws

6. Originally Posted by acevipa
P(X=2)=0.5

That just tells you the expected value of the dice. But what does it say about the expected no. of throws
I don't know what you mean, but in fact P(X=2) = 1/4. This is because in order to end at 2 throws, we must throw odd then even, so (1/2)(1/2) = 1/4. Similarly, to end at three throws we must throw odd then odd then even, and P(X=3) = 1/8.

We get the sum E(X) = 1/2 + 2/4 + 3/8 + 4/16 + 5/32 + ...

Above I mention a method of evaluating the sum, after which we will get E(X) = 2. Like I wrote above, the way I found seems kind of messy, but maybe that's a standard way, don't really know. If you want me to show you I can.

7. Originally Posted by undefined
I don't know what you mean, but in fact P(X=2) = 1/4. This is because in order to end at 2 throws, we must throw odd then even, so (1/2)(1/2) = 1/4. Similarly, to end at three throws we must throw odd then odd then even, and P(X=3) = 1/8.

We get the sum E(X) = 1/2 + 2/4 + 3/8 + 4/16 + 5/32 + ...

Above I mention a method of evaluating the sum, after which we will get E(X) = 2. Like I wrote above, the way I found seems kind of messy, but maybe that's a standard way, don't really know. If you want me to show you I can.
Ok so essentially, P(Even)=0.5, P(Odd)=0.5

Using a geometric distribution:

$P(X=k)=\left(\dfrac{1}{2}\right)^k$ which is the probability of getting an even number on the kth toss.

Then we use a summation, to find the expected value:

$E[X]=\sum_{k=1}^{\infty}k\left(\dfrac{1}{2}\right)^k$

8. Originally Posted by acevipa
Ok so essentially, P(Even)=0.5, P(Odd)=0.5

Using a geometric distribution:

$P(X=k)=\left(\dfrac{1}{2}\right)^k$ which is the probability of getting an even number on the kth toss.
The equation is right, but the wording at the end is off; this is the probability of getting k-1 odds followed by a single even.

Originally Posted by acevipa
Then we use a summation, to find the expected value:

$E[X]=\sum_{k=1}^{\infty}k\left(\dfrac{1}{2}\right)^k$
Yes.