Hard | Probability |

You are given an urn with 100 balls (50 black and 50 white). You pick balls from urn one by one without replacements until all the balls are out. A black followed by a white or a white followed by a black is "a colour change". Calculate the expected number of colour changes if the balls are being picked randomly from the urn.

Hint

Linearity of expectation

Solution

There are 99 positions. Let X_i be a random variable taking value 1 if i_th position has a colour change and zero otherwise.

We have to find expected value of E[X_1 + X_2 + ... + X_99]

Since all X_i are equivalent, the answer is 99*E[X_i]

E[X_i] = ((50/100)*(50/99)+(50/100)*(50/99)) = 50/99

So, Answer is 50.

We have to find expected value of E[X_1 + X_2 + ... + X_99]

Since all X_i are equivalent, the answer is 99*E[X_i]

E[X_i] = ((50/100)*(50/99)+(50/100)*(50/99)) = 50/99

So, Answer is 50.

Source: Placement test

Enable Like and Comment Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Easy level covers all common puzzles asked in technical interviews. Select medium or hard level to prepare for quant interviews, or written puzzle test.

Brainstellar started as deadly puzzles' page on facebook. You can send message to the facebook page. Brainstellar on facebook

This section has all puzzles ordered from oldest to newest. This is the order I discovered them in.

Rolling the bullet Pirates & The Treasure Which Switch? Lucky Candy All Girls World? Tigers & The Sheep Duck & Fox The Plane in the Wind Burning Cords Pair of Socks Antipodal points Accidents in Half Time Monty Hall Problem Prisoner's Hat Fork in Road Water & Wine 100 Light bulbs Getting fair result from unfair coin Waiting for the Train 2 Eggs e^Pi or Pi^e Shooting in Circle Invisible Dice Daughter or Son Dark Room Deck Cheating Husbands Father of lies Devil's Penny Witches at the coffee shop Poisonous wine Drunk Passenger? Stick to Triangle Rabbit on the Staircase Sharing Wood Infinity & Beyond Chuck a Luck MULTILINGUAL Guess the Toss Pattern on Snowflakes King's Salary Counting on friends Random Ratio Second Chance Innocent Monkey Consecutive Heads Chess Tournament Number of Double Heads Breaking Stick Prisoner's Hat (multicolor) Rainbow Hats 2 Equations & 3 Unknowns Domino Covering Fruit Magic Catching Ants Color Complex Light Bulbs in circle Chocolate Bar Dead Men Walking Square Infection Colored Runs of Cards Drunk Ant Distance from North Pole Expected Breakup Length Messing with Envelops Collecting Lucky coupons The Noodles Distinct Number Draws Greed for an ACE Random point on disk Enclosing The Center Sum To One Random Walk Left Some Candies Catching the Submarine Catching the Spy Pure Gold Game of Divisors Counter Strike Sharing a Secret Weights Reckoning Gas Stations on Circular Trek Bricking Box To Begin or Not to begin? Crazy Postman Single Bid Waiting for a Truck The Blind Archer Red Dead Redemption Clan Size Min & Max Prisoner's Hat (Infinity) Crazy Clock Candy Game Overlapping Coins Scaling a Square Consecutive sums Intersecting Pillars Weird Sequences Color Switches

© BRAINSTELLAR |