Muhammad's pennies

Jenny places 100 100 pennies on a table, with 30 30 showing heads and 70 70 showing tails. She chooses 40 40 distinct pennies uniformly at random and turns them over. That is, if a chosen penny was showing heads, she turns it to show tails; if a chosen penny was showing tails, she turns it to show heads. After this process, what is the expected number of pennies showing heads?

This problem is shared by Muhammad A.


The answer is 46.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

13 solutions

Michal Forišek
May 20, 2014

Let H and T denote heads and tails. Each of the coins has probability 40/100=0.4 to be included in the random choice. Therefore, for each coin that currently shows H the probability that it ends H is 0.6. There are 30 such coins, so by linearity of expectation the expected number of H they will show at the end is 30 × 0.6 = 18 30 \times 0.6 = 18 . Similarly, for each coin that is currently T, the probability that it will be flipped to H is 0.4. There are 70 such coins, so the expected number of H these coins will show at the end is 70 × 0.4 = 28 70\times 0.4 = 28 . The total answer is then 18+28=46.

Nice and simple solution. Sadly I misread the question. I thought that you'd choose a coin, flip it over, then choose another coin and flip it over 40 times and had the result 41.086 as the expected value :/

Kai Ott - 4 years, 11 months ago
Zef RosnBrick
May 20, 2014

We begin by observing that E x [ # heads ] = 30 E x [ # of heads chosen ] + E x [ # of tails chosen ] Ex[\text{\# heads}] = 30 - Ex[\text{\# of heads chosen}] + Ex[\text{\# of tails chosen}] , since we lose any coin chosen showing a head, but gain any coin chosen showing a tail. Now, since there are always 40 coins chosen, and any coin is either a head or a tail, E x [ # of tails chosen ] = 40 E x [ # of heads chosen ] Ex[\text{\# of tails chosen}] = 40 - Ex[\text{\# of heads chosen}] , and so E x [ # heads ] = 70 2 E x [ # of heads chosen ] Ex[\text{\# heads}] = 70 - 2 \cdot Ex[\text{\# of heads chosen}] . Therefore it suffices to compute E x [ # of heads chosen ] Ex[\text{\# of heads chosen}] .

Now, since the number of heads chosen is a discrete random variable, we can transform this into the sum, E x [ # of heads chosen ] = i = 0 40 i P r [ i heads chosen ] = i = 0 40 i ( 30 i ) ( 70 40 i ) ( 100 40 ) Ex[\text{\# of heads chosen}] = \displaystyle\sum_{i = 0}^{40}{i \cdot Pr[i \text{ heads chosen}]} = \displaystyle\sum_{i = 0}^{40}{i \cdot \frac{{30 \choose i}{70 \choose 40 - i}}{{100 \choose 40}}} . At this point, let m = 30 m = 30 , n = 70 n = 70 , and r = 40 r = 40 , and it suffices to evaluate the sum, i = 0 r i ( m i ) ( n r i ) = i = 1 r i ( m i ) ( n r i ) \displaystyle\sum_{i = 0}^{r}{i \cdot {m \choose i}{n \choose r - i}} = \displaystyle\sum_{i = 1}^{r}{i \cdot {m \choose i}{n \choose r - i}} . Using the identity, i ( m i ) = m ( m 1 i 1 ) i \cdot {m \choose i} = m \cdot {m - 1 \choose i - 1} , we can transform this into, m i = 1 r ( m 1 i 1 ) ( n r i ) m \cdot \displaystyle\sum_{i = 1}^{r}{{m - 1 \choose i - 1}{n \choose r - i}} . Finally, performing the change of variables: r r + 1 r \rightarrow r' + 1 , i i + 1 i \rightarrow i' + 1 , and m m + 1 m \rightarrow m' + 1 , we get ( m + 1 ) i + 1 = 1 i + 1 = r + 1 ( ( m + 1 ) 1 ( i + 1 ) 1 ) ( n ( r + 1 ) ( i + 1 ) ) (m' + 1) \cdot \displaystyle\sum_{i' + 1 = 1}^{i' + 1 = r' + 1}{{(m' + 1) - 1 \choose (i' + 1) - 1}{n \choose (r' + 1) - (i' + 1)}} = ( m + 1 ) i = 0 r ( m i ) ( n r i ) = (m' + 1) \cdot \displaystyle \sum_{i' = 0}^{r'}{{m' \choose i'}{n \choose r' - i'}} .

Now, suppose we wish to choose r r' animals from a group of m m' dogs and n n cats. On the one hand, this is simply ( m + n r ) {m' + n \choose r'} . However, we can also condition on the number of dogs chosen, to get i = 0 r ( m i ) ( n r i ) \displaystyle \sum_{i' = 0}^{r'}{{m' \choose i'}{n \choose r' - i'}} . Using this identity (which we should note is commonly referred to as the Chu-Vandermonde identity), the previous sum becomes ( m + 1 ) ( m + n r ) (m' + 1) \cdot {m' + n \choose r'} , and reversing the change of variables, we get, m ( m + n 1 r 1 ) m \cdot { m + n - 1 \choose r - 1} .

Therefore, given that we initially chose m = 30 m = 30 , n = 70 n = 70 , and r = 40 r = 40 , we have E x [ # of heads chosen ] = 30 ( 99 39 ) ( 100 40 ) = 12 Ex[\text{\# of heads chosen}] = \frac{30 \cdot {99 \choose 39}}{{100 \choose 40}} = 12 . Thus, E x [ # heads ] = 70 2 12 = 46 Ex[\text{\# heads}] = 70 - 2 \cdot 12 = 46 , as needed.

Tan Kin Aun
May 20, 2014

Among 40 pennies chosen, the expected number of heads chosen is 30% of 40, which is 12 (These 12 pennies will become tails.) while the expected number of tails chosen is 70% of 40, which is 28 (These 28 pennies will become heads.). Therefore, the expected number of heads at the end is 30 12 + 28 = 46 30-12+28=46 .

Need to state why the expected value is what it is.

Calvin Lin Staff - 7 years ago

same idea here :)

Abdullah Ahmed - 5 years, 1 month ago
Calvin Lin Staff
May 13, 2014

Let I i I_i be the indicator variable that the ith penny shows heads. WLOG, the first 70 pennies are currently showing tails. Then, for 1 i 70 1 \leq i \leq 70 , E ( I i ) = 1 × 40 100 + 0 × 60 100 = 2 5 E(I_i) = 1 \times \frac {40} { 100} + 0 \times \frac { 60} { 100} = \frac {2}{5} and for 71 i 100 71 \leq i \leq 100 , E ( I i ) = 1 × 60 100 + 0 × 40 100 = 3 5 E(I_i) = 1 \times \frac{60} { 100} + 0 \times \frac{40} { 100} = \frac {3}{5} .

Let I = I i I = \sum I_i . By the linearity of expectation , E [ I ] = E [ I i ] = 70 × 2 5 + 30 × 3 5 = 46 E[I] = E[I_i] = 70 \times \frac{2}{5} + 30 \times \frac{3}{5} = 46 .

Note: It is not immediately obvious that we expect 40 100 × 70 \frac{40}{100} \times 70 tails to be flipped.

Taking only 1 penny into account:

We want it to be an head at the end.

If it was already an head, 30% chance, there is a 60% chance of not being changed.

If it was a tail, 70% chance, there is a 40% chance of being changed.

So, taking 100 pennies into account, the expected number of pennies showing heads will be given by:

100 [(0.3 x 0.6) + (0.7 x 0.4)] = 46

Prince Loomba
Jan 22, 2016

3:7 of 40->12 heads and 28 tails. Remaining heads+selected tails=new heads=18+28=46

Ali Qureshi
Sep 18, 2015

probability of picking heads in 40 picks = 30 100 = 12 40 \frac {30}{100}=\frac{12}{40}
probability of picking tails in 40 picks = 28 40 \frac {28}{40} Now we expect that the 12 heads picked are now 12 tails and the 28 tails picked are now 28 heads. So the expected no of heads are 30-12+28=46 (the 12 are those who are turned into tails)

Aamir Kc
May 20, 2014

Jenny has 30% chance of picking a penny showing head and 70% chance of picking a penny showing tail.

Out of 40 distinct pennies, she will turn over 70% of 40=28 tails and 30% of 40=12 heads.

28 tails after turning over become head and 12 heads become tails.

Hence, total no. of head = 30-12+28=46

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago
Mama Mia
May 20, 2014

30 : 70 = 3 : 7 3m+7m = 40 m = 4 12 heads are going to be turned While 28 tails are going to be turned to heads

So the expected number of heads 28 + 30 - 12 = 46

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago
Patrick Cobb
May 20, 2014

She is turning over 2/5 of the pennies at random. As the 40 coins are distinct we know a coin is either turned over once or not at all. We can consider the 30 heads and the 70 tails separately. One would expect her to turn over 2/5 of the 30 heads (12 coins), so these 30 coins now consist of 18 heads and 12 tails. At the same time 2/5 of the 70 tails will also be turned over (28 coins). These 70 coins now consist of 28 heads and 52 tails. Therefore, the total number of heads is 18+28=46.

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago
Jun Yitt
May 20, 2014

Let

A = event of choosing a heads to be flipped to tails

B = event of choosing a tails to be flipped to heads

P(A) = 30/100 = 3/10

P(B) = 70/100 = 7/10

Let

n(A) = Number of heads that are flipped to tails

n(B) = Number of tails that are flipped to heads

Therefore, out of 40 pennies that are flipped,

P(A) = n(A)/40

n(A) = 40P(A) = 40(3/10) = 12

P(B) = n(B)/40

n(B) = 40P(B) = 40(7/10) = 28

Net change of heads = -12 + 28 = 16

Final number of heads

= Initial number of heads + net change of heads

= 30 + 16

= 46

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago
Vidyanand Wagh
May 20, 2014

Since the pennies are being chosen 'uniformly', the ratio of 'chosen heads' to 'chosen tails' must be maintained. 'Chosen at random' means any penny can be chosen, given that the above condition is not violated. Now, as per the given information, initially, we had 30 heads and 70 tails.(that is, in a 3:7 ratio) Now, we select x heads and y tails such that (x+y)=40 and x:y=3:7 Clearly, x=12 & y=28. 12 coins were changed to tails, while 28 coins became heads. Therefore, total no. of heads = 30 - 12 +28 = 46

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago
Aman Rajput
May 20, 2014

"Assuming that pennies are turned only once"

Initially 30 pennies are showing heads .

So , of all the 40 pennies turned ,there is an equally likely 30% chance of pennies turned will have initially head.

Number of heads now = 30 - ((\frac {30}{100}) \times 40) = 18

Number of tails now = 70 + ((\frac {30}{100}) \times 40) = 82

Now , initially 70 pennies was showing tails. So taking the same logic 70% of pennies turned will have tails initially.

Number of heads now= 18 + ((\frac {70}{100}) \times 40) = 46 Number of tails now= 82 - ((\frac {70}{100}) \times 40) = 54.

So, finally 46 pennies will face head and 54 will face tails.

Hence , 46 is the correct answer.

It is not guaranteed that 12 heads will be turned.

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...