# # of sophomore girls? Taylor expansion? ...

Show 40 post(s) from this thread on one page
Page 2 of 2 First 12
• Dec 6th 2006, 01:26 AM
CaptainBlack
Quote:

Originally Posted by Ruichan
5. Cards from an ordinary deck are turned face up one at a time (w/o replacement). Compute the expected number of cards that need to be turned face up in order to obtain 2 aces.

Captainblack, this was the way you taught me the last time for a question: Draw 2 cards without replacement from a deck of playing cards. What is the expected number of aces?

Let random variable x1 = 1 if an ace turns up on the turn, 0 otherwise.
E(x1) = 1/13

Let random variable x2 = 1 if an ace turns up on the 2nd turn, 0 otherwise.

E(x2) = 1/13

E(x1 + x2) = 2/13

Now, instead of # of ace turning up, it's finding the expected number of cards that needed to be turned to obtain 2 aces. Can I use the same way?

Mmmm.. There must be a way of looking at this which simplifies the
problem, but I can't see it at present.

I have run a Monte-Carlo experiment for this problem and the result
from that is the average number of cards that needs to be turned over
to find two aces is 21.21+/-0.02 (2 sigma).

OK, I can confirm that the expectaion is 21.2, but the computation is a
but long winded and fiddly to type here at present.

RonL
• Dec 6th 2006, 08:20 AM
Ruichan
It's doesn't help anything even if I do it this way, does it?

P(1 ace) = 4/52
P(2nd ace) = 3/51
Total prob = 4/52 * 3/51?

Doesn't make much sense. Geez... I hope my prof isn't going to put such questions in the finals otherwise I'll never be able to finish the paper.
• Dec 6th 2006, 09:08 AM
CaptainBlack
Quote:

Originally Posted by Ruichan
It's doesn't help anything even if I do it this way, does it?

P(1 ace) = 4/52
P(2nd ace) = 3/51
Total prob = 4/52 * 3/51?

Doesn't make much sense. Geez... I hope my prof isn't going to put such questions in the finals otherwise I'll never be able to finish the paper.

As I said in another post I have a way of evaluating this but without some
more work on its not of much use to you as it still involves some heavy duty
calculation which I think you cannot be expected to do. If I find a way of
simplifying it that reduces the amount of calculation I will post it.

It involves calculating the probailities P(k,n) of the k-th card being an ace
and the n-th card being an ace, n>k, and all the cards 1,2, ..k-1,k+1, ..n-1
not being aces.

The the probability that the n-th card is the 2-nd ace is:

P(n)=sum(k=1..(n-1)) P(k,n)

then:

E(number of cards to turn to find second ace)=sum(n=2..,50) n.P(n)

RonL
• Dec 6th 2006, 11:29 AM
Ruichan
Another card question
Fourteen playing cards are dealt (w/o replacement).
a) What is the probability that the first ace occurs in the fourteenth card?
b) What is the probability that the fourteenth card dealt is an ace?

I did it the following way. Can someone check if I did it correctly or point out that I'm wrong? My prof is too busy to help.

a) Total # of playing cards = 52
# of aces = 4
Probability of picking an ace = 1/13
Geometric distribution:
(1/13)(12/13)^13 = 0.0272
geo(14, 0.0272) = (0.0272)(1-0.0272)^13 = 0.019
Therefore probability that first ace occurs in the fourteenth card = 0.019?

b)P(fourteenth card an ace) =(1/13)^14
= 2.5 X 10^-16????
• Dec 6th 2006, 03:51 PM
Ruichan
Quote:

Originally Posted by Ruichan
5. Cards from an ordinary deck are turned face up one at a time (w/o replacement). Compute the expected number of cards that need to be turned face up in order to obtain 2 aces.

Captainblack, this was the way you taught me the last time for a question: Draw 2 cards without replacement from a deck of playing cards. What is the expected number of aces?

Let random variable x1 = 1 if an ace turns up on the turn, 0 otherwise.
E(x1) = 1/13

Let random variable x2 = 1 if an ace turns up on the 2nd turn, 0 otherwise.

E(x2) = 1/13

E(x1 + x2) = 2/13

Now, instead of # of ace turning up, it's finding the expected number of cards that needed to be turned to obtain 2 aces. Can I use the same way?

My prof just changed the question to with replacement. But I still don't know how to go about finding the expected number of cards.
• Dec 7th 2006, 04:50 AM
CaptainBlack
Quote:

Originally Posted by Ruichan
My prof just changed the question to with replacement. But I still don't know how to go about finding the expected number of cards.

That makes it simpler.

Consider the probability P(n,k) that n>k, and that n-th card is an A and the
k-th card is an A, and that all the other cards from 1-n are not A's

P(n,k)=(4/52)(4/52)(48/52)^(n-2)

that is the product of the probability that card n is an A, the probability that
card k is an A and the probability that the other n-2 cards from 1 upto n
are not A's.

Then the probability that the 2-nd A occurs at position n is:

P(n)=sum(k=1..n-1) P(n,k)=(n-1)P(n,1)=(n-1)(4/52)(4/52)(48/52)^(n-2)

(as the P(n,k)'s are independent of k)

So the expected position of the second A is:

E(n)=sum(n=2..52) nP(n)=(4/52)(4/52)(sum(n=2..50) n(n-1)(48/52)^(n-2)

RonL
• Dec 7th 2006, 10:01 AM
Ruichan
P(n,k)=(4/52)(4/52)(48/52)^(n-2)

Why do you multiply (4/52) twice? Isn't once enough since I don't know which card is the ace turning up at?

Thank you very much.

One question is what has the expected position of Ace has to do with the expected # of cards that need to be turned?
So that I find the position and then count the # of cards?
But in this case, no numbers have been given so there's no way to find the expected # of cards needed to be turned in numerical value since I don't know the position of the Aces?
• Dec 7th 2006, 11:38 AM
CaptainBlack
Quote:

Originally Posted by Ruichan
P(n,k)=(4/52)(4/52)(48/52)^(n-2)

Why do you multiply (4/52) twice? Isn't once enough since I don't know which card is the ace turning up at?

There are two aces in the claculation one at position k the second at position n (the others we don't care about as if they occur will be later in the sequence). Each of these aces gives a 4/52, just as the non-aces give
facors of 48/52.

RonL
• Dec 7th 2006, 11:42 AM
CaptainBlack
Quote:

Originally Posted by Ruichan
One question is what has the expected position of Ace has to do with the expected # of cards that need to be turned?
So that I find the position and then count the # of cards?
But in this case, no numbers have been given so there's no way to find the expected # of cards needed to be turned in numerical value since I don't know the position of the Aces?

The expected number of cards turned is by definition:

sum(n=2 .. 52) nP(n)

where n is the number of cards turned to reach the second ace.

But n is the position of the second ace in the sequence.

(note this sum is to 52 I may have used 50 earlier if I did it was a hang over
from the non-replacement case I will correct it when I finish this).

RonL
• Dec 7th 2006, 12:20 PM
Ruichan
Quote:

Originally Posted by CaptainBlack
There are two aces in the claculation one at position k the second at position n (the others we don't care about as if they occur will be later in the sequence). Each of these aces gives a 4/52, just as the non-aces give
facors of 48/52.

RonL

Oh ok, i understand now. Initially I was thinking that I could apply just one time 4/52 since I do not know where the ace will turn up, so it doesn't matter at position k or at position n since it will be one calculation of 4/52(48/52)^n-2.

Thank you very much.
• Dec 7th 2006, 05:44 PM
Ruichan
5. Cards from an ordinary deck are turned face up one at a time with replacement. Compute the expected number of cards that need to be turned face up in order to obtain 2 aces.

Captain Black, my prof did on the whiteboard the solution but he didn't explain. I'm wondering if you could help me with it.

Solution:
Let X1 denote the number of nonace card before the first ace. X2 denote the number of nonace cards before the first 2 aces.

P{X1=i, X2=j} = P{X1=j, X2=i}
===> X1 and X2 have the same distribution

E[X1] = 48/5

E(2 + X1 + X2) = 106/5.

How did he get the values for E[X1] and E[2+X1+X2]?
He just wrote down the solution to this question then erased it away to do another question as we were short on time.
Show 40 post(s) from this thread on one page
Page 2 of 2 First 12