Medium | Probability |

Snow-particles are falling on the ground one after another. A particular snowflake turns out to be of type "Stellar Dendrite" with probability 'p' if its previous particle was also Stellar Dendrite, and with probability 'q' if previous one was something else. If a snowflake is picked from ground, what is the probability that it is Stellar Dendrite?

PS:Although no two snowflakes are alike, yet there are various crystalline structures to categorize their interesting shapes. The image depicts the most popular shape, called Stellar Dendrites, which means star-like particles with tree-like branches.

PS:Although no two snowflakes are alike, yet there are various crystalline structures to categorize their interesting shapes. The image depicts the most popular shape, called Stellar Dendrites, which means star-like particles with tree-like branches.

Hint

Need to form a recursive equation of conditional probability

Answer

probability is q/(1-p+q)

Solution

Solution by Palak:

Let x be the probability that a snowflake picked from ground is Stellar Dendrite. Thus, when a new snowflake is falling, with prob=x the last snowflake was Stellar Dendrite => prob the new falling snowflake is Stellar Dendrite = x*p + (1-x)*q. But, for the composition of the snowflakes on the ground to remain constant, xp+(1-x)q should be =x => x=1/(1+(1-p)/q)

This is a kind of steady state analysis.

Let x be the probability that a snowflake picked from ground is Stellar Dendrite. Thus, when a new snowflake is falling, with prob=x the last snowflake was Stellar Dendrite => prob the new falling snowflake is Stellar Dendrite = x*p + (1-x)*q. But, for the composition of the snowflakes on the ground to remain constant, xp+(1-x)q should be =x => x=1/(1+(1-p)/q)

This is a kind of steady state analysis.

Source: Self

Enable Like and Comment 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 Latest solved Puzzles

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

© BRAINSTELLAR |