Posts

Showing posts from November, 2012

Drawing Aces from a Deck

Q: What is the average number of cards you need to draw from a well shuffled deck of cards before you get an Ace?

The Moscow Puzzles: 359 Mathematical Recreations (Dover Recreational Math)

A:There is a lot of discussion on the web on using hypergeometric distributions for solving these kind of problems. The hypergeometric distribution is just a big word for something fairly simple. Here is the wikipedia explanation for it (link).
But an easier "smarter" way to solve this puzzle (along with ones that fit this framework) is to work with expectations and indicator random variables. Indicator random variables are like on/off switches. They are 1 under certain conditions, 0 otherwise.

Let us assume that the deck of cards (52 total) is as follows, it has 4 aces and all others are labelled X. Let $$Z_i$$ represent the indicator variable for a card in position $$i$$ with value set as 1 when all aces are in behind it, 0 otherwise.

The total number of draws will then be

$$N = \sum_{i=1… A Coin Tossing Game: Optimal Strategy Q: A & B agree to play a coin tossing game. The coin is fair and has a 50% chance of coming heads or tails. The coin is tossed and the first to flip a heads wins. If A starts the game what is the probability that A would win. A: Assume the probability that A wins the game be $$x$$. If A tosses first, she has a probability of $$\frac{1}{2}$$ of winning on the first toss. If not, the coin goes to B. When B gets the coin, the probability that B would win is now the same as A. This additionally implies that A would lose with probability $$1 - x$$. The value of x can be stated recursively as follows$$x = \frac{1}{2} + \frac{1}{2}\times(1-x)$$Solving for $$x$$ yields$$x = \frac{2}{3}$$Starting first greatly improves the odds of winning! If you are looking to buy some books in probability here are some of the best books to learn the art of Probability Here are a few Fifty Challenging Problems in Probability with Solutions (Dover Books on Mathematics) This book is a great compilation … Winning at a Russian Roulette Q:Three bullets are inserted into a gun which has six slots at random positions. The trigger is pulled, and no shot is fired. What is the probability a bullet will fire if the trigger is pulled once again? What is the probability of a fire in the 3rd pull if it is pulled twice and both are blanks? A: Let us work through the cases. There are four possible configurations the revolver could be in. These are shown in the picture below. There are a total of 6C3 configurations possible. Each of the first three configurations can happen in 6 ways, while the last configuration can happen in just 2 ways. Given that the first shot was a blank, the probability of firing a bullet in each of the configurations are the following The total probability (as the above cases are mutually exclusive) is the weighted sum given as$$P(Fire) = \frac{6}{20}\times\frac{1}{3} + \frac{6}{20}\times\frac{2}{3}\times 2 + \frac{2}{20}\times1 = \frac{3}{5}

If two pulls on the trigger goes blank only configuration 1 h…

Fun with Uniform Random Numbers

Q: You have two uniformly random numbers x and y (meaning they can take any value between 0 and 1 with equal probability). What distribution does the sum of these two random numbers follow? What is the probability that their product is less than 0.5.

The Probability Tutoring Book: An Intuitive Course for Engineers and Scientists

A: Let z = x + y be the random variable whose distribution we want. Clearly z runs from 0 to 2. Let 'f' denote the uniform random distribution between [0,1]. An important point to understand is that f has a fixed value of 1 when x runs from 0 to 1 and its 0 otherwise.
So the probability density for z, call it P(z) at any point is the product of f(y) and f(z-y), where y runs from 0 to 1.

However in that range f(y) is equal to 1. So the above equation becomes

From here on, it gets a bit tricky. Notice that the integral is a function of z. Let us take a look at how else we can simply the above integral.

It is easy to see that f(z-y) = 1 when (z-y) is between…