Medium | Probability |

p and q are two points chosen at random between 0 & 1. What is the probability that the ratio p/q lies between 1 & 2?

Hint

Graph Shading. (Whenever we see two uniform random variables, we graph them up!)

Solution

Assume that the points are x & y. Create x-y graph, and our desired region is the area between lines y=x & y=2x. This region is 1/4th of the rest.

Source: Written Test

Enable Like and Comment Medium | Probability |

Roll a die, and you get paid what the dice shows. But if you want, you can request a second chance & roll the die again; get paid what the second roll shows instead of the first. What is the expected value?

Medium | Probability |

A very innocent monkey throws a fair die. The monkey will eat as many bananas as are shown on the die, from 1 to 5. But if the die shows '6', the monkey will eat 5 bananas and throw the die again. This may continue indefinitely. What is the expected number of bananas the monkey will eat?

Hint

Law of total probability

Answer

4

Solution

This uses law of total probability very silently, i.e., E( E(X|Y) ) = E(X). Suppose X expected number bananas eaten overall and Y = number shown on dice.

E1 = E( X | Y = 1,2,3,4,5) = 3

E2 = E( X | Y = 6) = 5 + E(X)

now, E(X) = 5/6*E1 + 1/6*E2

Solving this simple equation gives E(X) = 4

E1 = E( X | Y = 1,2,3,4,5) = 3

E2 = E( X | Y = 6) = 5 + E(X)

now, E(X) = 5/6*E1 + 1/6*E2

Solving this simple equation gives E(X) = 4

Source: Self, to show an example of recursive probability

Enable Like and Comment Medium | Probability |

What is the expected number of coin tosses required to get n consecutive heads?

Hint

That sum wont work! Just find the recursive relation.

Answer

En = 2En−1 + 2, giving En = 2^(n+1)-2

Solution

Define let Xn = number of tosses to get n consecutive heads; E(Xn) = expected number of coin tosses we require from now on, to get n consecutive heads. Recall the law of total probability,

E(Xn) = E ( E(Xn) |Y) )

where Y = current toss (either Head or tail).

En = (1/2)( E(Xn) | H) + (1/2)( E(Xn) | T)

En = (1/2)( E(X(n-1)) + 1 |H) + (1/2)( E(Xn) + 1 | T)

the extra 1 is because we just used a toss

En = 1 + (1/2)*E(n-1) + (1/2)*En

This above equation is logical and should be written directly.

=> En = 2E(n-1) + 2

This simplifies to 2^(n+1)-2 as E0 = 0. (not required)

E(Xn) = E ( E(Xn) |Y) )

where Y = current toss (either Head or tail).

En = (1/2)( E(Xn) | H) + (1/2)( E(Xn) | T)

En = (1/2)( E(X(n-1)) + 1 |H) + (1/2)( E(Xn) + 1 | T)

the extra 1 is because we just used a toss

En = 1 + (1/2)*E(n-1) + (1/2)*En

This above equation is logical and should be written directly.

=> En = 2E(n-1) + 2

This simplifies to 2^(n+1)-2 as E0 = 0. (not required)

Source: Top Quant Interview

Enable Like and Comment Medium | Probability |

A chess tournament has K levels and 2^K players with skills 1 > 2 > ... >2^K. At each level, random pairs are formed and one person from each pair proceeds to next level. When two opponents play, the one with better skills always wins. What is the probability that players 1 and 2 will meet in the final level?

Hint

Consider K=1 (2 players), the probability is 1.

Consider K=2 (4 players); first round can be in following ways:

1-2 | 3-4

1-3 | 2-4

1-4 | 2-3

They don't meet in finals in first case (of 3). Thus, for K=2, the probability that they meet is 2/3.

I assure you that this probability gets close to 1/2 for large K. Just notice that if 1 and 2 meet before final, they dont meet at final.

Consider K=2 (4 players); first round can be in following ways:

1-2 | 3-4

1-3 | 2-4

1-4 | 2-3

They don't meet in finals in first case (of 3). Thus, for K=2, the probability that they meet is 2/3.

I assure you that this probability gets close to 1/2 for large K. Just notice that if 1 and 2 meet before final, they dont meet at final.

Answer

N/2(N-1)

Solution

If you worked out conditional probability, that is fine. Here we present the combinatorial solution. Imagine the levels proceed in any random way such that player X and Y appear for final level. This can be imagined as N players getting partitioned into two groups of N/2 players each, with player X topping in first group and player Y in second. The best player of each partition reaches final. We only need to ensure that above partition separates player 1 from 2. The probability that a random partition separates 1 & 2 is (N/2) / (N-1) (how?)

Here is how: for creating a partition to separate them, we pick (N/2) people from N, wishing to take player 1, but not player 2.

Here is how: for creating a partition to separate them, we pick (N/2) people from N, wishing to take player 1, but not player 2.

Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |