# Probability - conditional

1. Oct 31, 2012

### CAF123

1. The problem statement, all variables and given/known data
I flip a coin 10 times and want to know the probability of getting exactly 7 heads given that the first flip is heads.

3. The attempt at a solution

The question above is part of a larger question involving the binomial RV, but I am only needing assistance here.

Using Bayes's Formula I get to the stage where I need to compute P(first one is heads| 7 heads out of 10 flips).

So what I said was there is 10 choose 7 different rearrangements of 7 heads out of 10 flips. (So this is the reduced sample space). Then I considered how many ways to get 7 heads out of 10 flips given that the first is a head. This implies there is one choice for the first flip and another 9 choose 6 ways to still attain 7 heads out of 10 flips. Therefore the probability I want is 1 x (9 choose 6)/(10 choose 7). I believe this is correct.

Someone else said this was equal to 7 x (9!)/(10!). I don't quite sure where this comes from. I think the 10! comes from the fact that you can rearrange the 10 flip outcomes 10! ways = |s|. Then if you glue the first head (flip 1) in place, then there are 9! different ways to rearrange the other flips. I don't see why this is multiplied by 7. If you consider another head out of the 7 heads, then you can't rearrange the other 9 members randomly since the first flip is fixed to be heads.
What have I missed?

Also how would I compute P(first one is heads and(intersect) we have 7 heads out of 10 flips) if I appealed to the definition of cond. prob explicitly?

thanks.

2. Oct 31, 2012

### LCKurtz

I don't see why you are invoking Bayes theorem. Given that the first one is heads, what you need is the probability of getting 6 heads in the remaining 9 tosses. Isn't the number of successes in 9 tosses a binomial distribution B(9, 1/2)?

3. Oct 31, 2012

### CAF123

Sorry, I probably should have posted the whole question. we have 2 coins, one lands heads with prob 0.4 and the other 0.7. I randomly pick one of these coins and flip it 10 times.
a) What is the prob of 7 heads out of 10 flips? (got this)
b) What is the conditional prob of 7 heads out of 10 flips given the first one is heads?

I have computed everything apart from P(first one heads|7heads). I have an answer as detailed by my previous post, but I would like to understand the alternate method.(as also detailed in my last post).
Many thanks.

4. Oct 31, 2012

### Ray Vickson

For (a), did you get P{H = 7} = (1/2)*Bin(H=7|n=10, p=0.4)+(1/2)*Bin(H=7|n=10,p=0.7)? Here, the coefficients 1/2 and 1/2 are prior probabilities of the two coin types.

Let p = P{have a 0.4-coin|first toss = H}; this equals
P{first = H & have a 0.4-coin}/P{first toss = H}.
Can you work out the numerator? Can you work out the denominator? Now, if you know p, what should you do next?

RGV

5. Oct 31, 2012

### CAF123

Hi RGV,
The denominator would be (1/2)(0.4) + (1/2)(0.7) = P(first =H)
As I said in my first post, I really seem to struggle with intersection and so I turn to Bayes's formula. Could you show me how to compute the intersection, P(first= H and have a 0.4 coin)?

After this presumably I compute the same for the 0.7 prob coin? And then add the results together?

6. Nov 2, 2012

### CAF123

Am I along the right lines?

7. Nov 2, 2012

### HallsofIvy

Staff Emeritus
And I presume you got $\begin{pmatrix}10 \\ 7\end{pmatrix}(0.5)^{10}$.

As LCKurtz told you this is precisely the probability of getting 6 heads in the last 9 flips- it is $\begin{pmatrix}9 \\ 6\end{pmatrix}(0.5)^9$.

Are you interpreting "conditional probability" to mean that you are required to us Baye's formula? This is a "conditional probability" simply because it says "given that ...". That has nothing to do with how you are to calculate it.

If you want to see the connection between the two methods, observe that the conditional probability is just the original probability of 7 heads in 10 flips divided by (10/7)(0.5).

8. Nov 2, 2012

### Ray Vickson

The quantities
$${10 \choose 7}(0.50)^{10} = 0.1171875 \;\text{ and } {9 \choose 6} (0.5)^9$$ are not correct in this problem. In the first case, the probability of 7 heads is
$$P\{ 7\, H\} = (1/2){10 \choose 7} (0.4)^7 (0.6)^3 + (1/2) {10 \choose 7} (0.7)^7 (0.3)^3 = 0.15464763,$$
because there is a 50-50 chance of having chosen either a 0.4-coin or a 0.7-coin, and the binomial probabilities go along with the coin type. The second case is similar, but we need to use the revised probabilities of the two coin types (after observing that the first toss is heads).

RGV

Last edited: Nov 2, 2012
9. Nov 3, 2012

### CAF123

Hi RGV,
I have done everything except i have difficulty in finding P(first one heads and have 0.4 coin). (As you advised me to calculate before). If these two events were independent, then I know I could do P(EF) = P(E)P(F), but I don't think they are since the probability of getting a head is dependent on what coin you have. Can you assist here?
Also, after I do this, presumably I do exactly the same method for the 0.7 prob coin and add the two answers together?

10. Nov 3, 2012

### Ray Vickson

Sorry, I really cannot do more. All I can say is: think about what conditional probabilities mean, and how they are calculated.

RGV