Skip to main content

Posts

Three Random Numbers

Follow @ProbabilityPuz Q: You play a game with a friend where he chooses two random numbers between 0 and 1. Next you choose a random number between 0 and 1. If your number falls between the prior two numbers you win. What is the probability that you would win? A: Consider the number line between 0 and 1 shown in figure below Let \(x\) and \(y\) be the two numbers chosen. The probability of a win, i.e. choosing a number in the range between the two chosen numbers can be estimated as \(\frac{|y-x|}{1}\). Note, we have chosen the modulus operation because \(x\) could be greater than \(y\) or vice versa. The feasible region of numbers to be chosen to win, is the ratio of the absolute difference between \(x\) and \(y\) divided by the total possible range, which is 1. In order to estimate the probability that a third chosen number will lie between the two we integrate out (a double integral) between the ranges of \([0,1]\). This is estimated as $$ P(\text{win}) = \int_{...

The Three Magical Boxes

Follow @ProbabilityPuz Q: You are playing a game wherein you are presented 3 magical boxes. Each box has a set probability of delivering a gold coin when you open it. On a single attempt, you can take the gold coin and close the box. In the next attempt you are free to either open the same box again or pick another box. You have a 100 attempts to open the boxes. You do not know what the win probability is for each of the boxes. What would be a strategy to maximize your returns? Machine Learning: A Probabilistic Perspective (Adaptive Computation and Machine Learning series) A: Problems of this type fall into a category of algorithms called "multi armed bandits". The name has its origin in casino slot machines wherein a bandit is trying to maximize his returns by pulling different arms of a slot machine by using several "arms". The dilemma he faces is similar to the game described above. Notice, the problem is a bit different from a typical estimatio...

Santa's Dice Game

Follow @ProbabilityPuz Q: Santa offers you to play a game of dice. You get to roll a dice six times. You can stop rolling whenever you wish and you get the dollar amount shown on that roll. What is an optimal strategy to maximize your payoff? Probability and Statistics (4th Edition) A: Let us take a moment and think through this. At each point in the sequence of rolls you make, you have a decision to make. Do you keep rolling or do you stop and walk away with what is being "offered" to you? You also need to bear in mind that if you keep pushing your luck you will reach a point (the 6th roll) where you would have to be content with whatever comes out for the last roll. So lets start with the simple case of what the expected payoff is for the last roll. Lets call this \(E_{6}\). To compute it, simply take the payoff multiplied by the respective probability. $$ E_{6} = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = \frac{7}{2} = 3.5 $$ The general strategy to be follow...

A Box of Apples and Oranges

Follow @ProbabilityPuz Q: A box contains 6 apples and 5 oranges. You know the number of apples are 6. You pick them out one at a time. What is the probability that the box will be empty by the time you have all 6 apples out? A Perfect Mathematical Christmas Gift A: It is tempting to say that the answer is \(50\%\), but its not, as explained further below. Let us start with the number of ways to pull all 11 out. Since you know that there are six apples, you would keep drawing until you see all six apples. The six apples can come out in any order. So there are \(\binom{11}{6}\) ways to do this.The number of favorable cases can be computed by making the following observation. If the box has to be empty when the last apple is drawn, then the finishing of the draws must end with 1, 2, 3, 4, 5 or 6 apples. These are the only scenarios. It can never end in an orange being drawn. Lets first consider the case when the last fruit drawn is an apple and the one prior is an orange...

The Numbers on a Dice

Follow @ProbabilityPuz Q: A die is rolled and the numbers on all the visible faces is multiplied together \(=S\). How would you choose a highest number such that it is guaranteed to divide the product. A: The puzzle rests on a simple fact of prime factorization. Every number can be expressed as a product of prime numbers. For the given example, assume the face that is not visible is 1. The product of the remainder of numbers is \(6 \times 5\times\ldots \times 2\) or equivalently \(6!\). If the face that is invisible is 2, the number \(S\) is \(\frac{6!}{2}\), if it is 3 the number \(S\) is \(\frac{6!}{3}\) and so on. The number \(6!\) can be expressed as prime numbers as \(2^{4}\times3^{2}\times 5\). Let us enumerate the cases for each of the faces that is invisible, the product \(S\) expressed in terms of prime numbers are as follows \(2^{4}\times3^{2}\times5\) \(2^{3}\times3^{2}\times5\) \(2^{4}\times3^{1}\times5\) \(2^{2}\times3^{2}\times5\) \(2^{4}\times3^{2}\)...