Probability of throwing n/2 heads out of n tosses

  • Thread starter WCMU101
  • Start date
  • Tags
    Probability
In summary: That's the whole point of conditioning.You have two random variables, X1 and X2. X1 is the first die and X2 is the second. I tell you that X1=6. Now you have no uncertainty about X1. You have 1/6 uncertainty about X2. The question is about the uncertainty of X2 given that you have observed a 6, not the uncertainty of X1. I am looking for P(X2=6|X1=6).Sorry. Probability is about uncertainty. You only have uncertainty about one die.Obviously in the way you think about this experiment this is so, so if I tell you "the first dice is 6" then your
  • #1
WCMU101
14
0
Doing a bit of study for an interview. Came across this question:

"n unbiased coins. What is the probability that half of them exactly are
heads. Answer the question for n= 2, 3, 20000."

My answers would be:

n = 2: p(1h) = 0.5
n = 3: p(1.5h) = 0
n = 20000: p(10000h) = approx. 0 (close enough to a continuous random variable?)

Do you agree/disagree?

Also just checking another one:

"2 fair dice. What is the probability of both showing six if I have observed
at least one six."

I would say the answer is 1/11 - working: (1*P(2 6's)/(1-P(0 6's))). Is that correct?

Thanks for any advice!

Nick.
 
Physics news on Phys.org
  • #2
WCMU101 said:
Doing a bit of study for an interview. Came across this question:

"n unbiased coins. What is the probability that half of them exactly are
heads. Answer the question for n= 2, 3, 20000."

My answers would be:

n = 2: p(1h) = 0.5
n = 3: p(1.5h) = 0
n = 20000: p(10000h) = approx. 0 (close enough to a continuous random variable?)

Do you agree/disagree?

For x=10,000 P=0.011 from the normal approximation. Note that would be P(x):[itex]9999.5\leq x< 10000.5[/itex] You can do this because the underlying binomial distribution is discrete.

just checking another one:

"2 fair dice. What is the probability of both showing six if I have observed
at least one six."

I would say the answer is 1/11 - working: (1*P(2 6's)/(1-P(0 6's))). Is that correct?

?
If you observe one of a pair of dice showing 6, why would the probability that the unobserved die would be P(x=6) = 1/11.? Obviously P(x=6) = 1/6.
 
Last edited:
  • #3
Thanks for the quick reply!

Regarding the first question: Could you come up with that answer without electronic aid? It approaches the normal distribution due to central limit theorem and the mean is 10000 and variance 20000*.5*.5=5000. So I could write the pdf, but I could not do the integration analytically. I'm not sure.

For the second question: Yeah now that I think about it my answer sounds stupid. I kind of just jumped at Bayes' theorem. Yet, I feel like I still should have got the correct answer - could you tell me where I've gone wrong:

P(2 6's | observed at least 1 6) = P(observing at least 1 6 | 2 6's)*P(2 6's)/P(observing at least 1 6)

P(2 6's | observing at least 1 6) = 1*(1/36)/(1-25/36) = 1/11

Any help would be greatly appreciated!

Thanks.

Nick.
 
Last edited:
  • #4
WCMU101 said:
Thanks for the quick reply!

Regarding the first question: Could you come up with that answer without electronic aid? It approaches the normal distribution due to central limit theorem and the mean is 10000 and variance 20000*.5*.5=5000. So I could write the pdf, but I could not do the integration analytically. I'm not sure.

You can do it analytically, but why would you want to do it by hand? This is why we have computers.

For the second question: Yeah now that I think about it my answer sounds stupid. I kind of just jumped at Bayes' theorem. Yet, I feel like I still should have got the correct answer - could you tell me where I've gone wrong:

P(2 6's | observed at least 1 6) = P(observing at least 1 6 | 2 6's)*P(2 6's)/P(observing at least 1 6)

P(2 6's | observing at least 1 6) = 1*(1/36)/(1-25/36) = 1/11

Any help would be greatly appreciated!

P((X2=6)|X1=6) = ((1/6)(1))/1 = 1/6. X1 is the first die which you observed, so P(X1=6)= 1.
 
  • #5
That first question was (apparently) asked in an interview - generally no calculators/computers. I didn't think it was possible to integrate the normal pdf analytically. It is easy to work with the normal pdf when you are working in terms of standard deviations (68-95-99.7 rule). Calculating 20000C10000*(.5^20000) is also too difficult to do by hand and I don't think many calculators can handle it either (I think).

For the second one I would've gone:

P(X2=6 | X1=6) = P(X1=6 | X2=6)*P(X2=6)/P(X1=6) = P(X1=6)*P(X2=6)/P(X1=6) = P(X2=6) = 1/6

Bayes' is killing me at the moment haha if I get the wording wrong I get the question wrong.

Thanks!

Nick.
 
Last edited:
  • #6
I'm afraid SW VandeCarr is misleading you wrt the dice. You were correct in the first place, it's 1/11. See my response to your Bayes question.

For the coins, we have:
[itex]\left(^{2n}_{n}\right).2^{-n}[/itex] =
(2n)!/(n!n!.2^n)
Do you know Stirling's approximation for factorials? Very useful:
n! ~ (n/e)^n.√(2πn)
Using this, the above reduces to 1/√(πn)
 
  • #7
haruspex said:
I'm afraid SW VandeCarr is misleading you wrt the dice. You were correct in the first place, it's 1/11. See my response to your Bayes question.

For the coins, we have:
[itex]\left(^{2n}_{n}\right).2^{-n}[/itex] =
(2n)!/(n!n!.2^n)
Do you know Stirling's approximation for factorials? Very useful:
n! ~ (n/e)^n.√(2πn)
Using this, the above reduces to 1/√(πn)

Sorry. You'll have to explain why the probability of one die showing 6 is not 1/6 if you already know the value of the other die. is 6. It can only have 6 possible values.
 
Last edited:
  • #8
SW VandeCarr said:
Sorry. You'll have to explain why the probability of one die showing 6 is not 1/6 if you already know the value of the other die. It can only have 6 possible values.

Hi SW VandeCarr,

I think it is about the wording, it is easy to make a mistake:

P (observing at least one 6) = 11/36
P (first dice is 6) = 1/6

You were thinking about the second... right? Natural language can be quite misleading in statistics.
 
  • #9
viraltux said:
Hi SW VandeCarr,

I think it is about the wording, it is easy to make a mistake:

P (observing at least one 6) = 11/36
P (first dice is 6) = 1/6

You were thinking about the second... right? Natural language can be quite misleading in statistics.

Sorry. Probability is about uncertainty. You only have uncertainty about one die.
 
  • #10
SW VandeCarr said:
Sorry. Probability is about uncertainty. You only have uncertainty about one die.

Obviously in the way you think about this experiment this is so, so if I tell you "the first dice is 6" then your reasoning holds. But how about if I see the two dices and I only tell you "there is at least one 6"? Now you have uncertainty about both dices because you don't know which dice is 6 or if they both are 6.
 
  • #11
viraltux said:
Obviously in the way you think about this experiment this is so, so if I tell you "the first dice is 6" then your reasoning holds. But how about if I see the two dices and I only tell you "there is at least one 6"? Now you have uncertainty about both dices because you don't know which dice is 6 or if they both are 6.

There need not be any assumption about order. I only need to be uncertain about one die which is the case here.
 
  • #12
SW VandeCarr said:
There need not be any assumption about order. I only need to be uncertain about one die which is the case here.

Well, I kindly disagree but hey, maybe I'm wrong and someone else can explain it better, I'm always willing to learn :smile:
 
  • #13
Roll two dice: 36 equally likely possible outcomes.
In 1 of those both are 6, in 10 of them exactly one is a 6.
I cannot see the dice, so I ask you "Is at least one a six?".
If you answer yes, that cuts it down to 11 possibilities, of which one is both sixes.
So the probability that the other is also a six is 1/11.

Suppose instead I asked you "Is the one you threw first a six?"
Now you will only answer yes for six cases, and in one of those the other is a six.
So now the probability that the other is also a six is 1/6.

The crucial thing to understand is the set of circumstances under which the information given would be true. They are not the same for the two wordings.
 
  • #14
WCMU101 said:
Do you agree/disagree?

"2 fair dice. What is the probability of both showing six if I have observed
at least one six."

I would say the answer is 1/11 - working: (1*P(2 6's)/(1-P(0 6's))). Is that correct?

This is the question I answered.
 
  • #15
WCMU101 said:
Doing a bit of study for an interview. Came across this question:

"n unbiased coins. What is the probability that half of them exactly are
heads. Answer the question for n= 2, 3, 20000."

My answers would be:

n = 2: p(1h) = 0.5
n = 3: p(1.5h) = 0
n = 20000: p(10000h) = approx. 0 (close enough to a continuous random variable?)
While asking nonsense questions has been in the vogue for a while, I for one don't do that. In other words, I would only ask that question if I expected you to know something about probability and statistics. And that answer of approximately is not good enough in this case. You should know either the binomial distribution or the law of large numbers. The binomial distribution quickly gives the exact answer, [itex]\frac{20000!}{(10000!)^2}2^{-20000}[/itex].

"Oh, you want a decimal expression? Let me use my computer. [Short while later] It's about 0.0056."

SW VandeCarr said:
For x=10,000 P=0.011 from the normal approximation. Note that would be P(x):[itex]9999.5\leq x< 10000.5[/itex] You can do this because the underlying binomial distribution is discrete.
That's a pretty lousy estimate. It's off by a factor of two.
WCMU101 said:
Also just checking another one:

"2 fair dice. What is the probability of both showing six if I have observed
at least one six."

I would say the answer is 1/11 - working: (1*P(2 6's)/(1-P(0 6's))). Is that correct?
I would say that this is a verging on one of those poorly worded statistical question that is begging to be misinterpreted. There's nothing wrong with asking an interviewer for a clarification. If he looked at both dice and reported that at least one is a six, your answer of 1/11 is correct. If he looked at only one die and said that at least one of the dice was a six (because he happened to see a six on the die he looked at), the answer is 1/6.
 

1. What is the probability of getting exactly n/2 heads out of n tosses?

The probability of getting exactly n/2 heads out of n tosses is equal to the binomial probability of getting n/2 successes out of n trials, where the probability of success is 0.5. This can be calculated using the formula P(X = x) = nCx (0.5)^x (0.5)^(n-x), where nCx represents the number of combinations of x successes out of n trials.

2. How does the number of tosses affect the probability of getting n/2 heads?

The probability of getting n/2 heads out of n tosses remains constant at 0.5 for any number of tosses. This is because each toss is an independent event, meaning that the outcome of one toss does not affect the outcome of the next toss. Therefore, the probability of getting n/2 heads out of n tosses is always 0.5, regardless of the number of tosses.

3. Is the probability of getting n/2 heads out of n tosses the same as the probability of getting n/2 tails?

Yes, the probability of getting n/2 heads out of n tosses is the same as the probability of getting n/2 tails. This is because a coin toss is a binary event, with two possible outcomes (heads or tails) and each outcome has an equal chance of occurring, which is 0.5. Therefore, the probability of getting n/2 heads is the same as the probability of getting n/2 tails.

4. What are the chances of getting more than n/2 heads out of n tosses?

The chances of getting more than n/2 heads out of n tosses depends on the value of n. As n increases, the probability of getting more than n/2 heads decreases. For small values of n, such as n=2 or n=4, the chances of getting more than n/2 heads is relatively high (50% and 37.5% respectively), but as n gets larger, the chances decrease significantly.

5. Can the probability of getting exactly n/2 heads out of n tosses ever be 1?

No, the probability of getting exactly n/2 heads out of n tosses can never be 1. This is because a probability of 1 means that an event is certain to occur, and in the case of coin tosses, it would mean that every single toss would result in a head, which is highly unlikely. The probability of getting n/2 heads out of n tosses is always a decimal value between 0 and 1.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
2K
  • Set Theory, Logic, Probability, Statistics
2
Replies
57
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
3K
Replies
0
Views
355
  • Set Theory, Logic, Probability, Statistics
2
Replies
41
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top