Home » Basic probability » Conditioning

# Category Archives: Conditioning

## Ant crawls along a grid

An ant crawls along a coordinate grid. The ant starts at \((0,0)\). At each step, the ant either moves up one unit (with probability 1/2) or to the right 1 unit (with probability 1/2).

After 5 steps the ant has

- a 5/32 chance of being at the coordinate \((4,1)\),
- a 10/32 chance of being at the coordinate \((3,2)\), and
- a 17/32 chance of being at one of the coordinates \((2,3), (1,4), (5,0), (0,5)\)

What is the probability that the ant is at position \((4,2)\) after 6 steps?

## Consecutive Tails

Let \(A_n\) be the event that in \(n\) flips of a fair coin, there are never 2 consecutive tails. Suppose we know the following probabilities.

- \(\mathbf{P}(A_{19})\approx 0.021\)
- \(\mathbf{P}(A_{20})\approx 0.017\)

Evaluate \(\mathbf{P}(A_{21})\)

## Hair and Eye Color

About 60% of the world’s population has brown eyes. About 20% of the world’s population has brown hair. Given that a person has brown eyes, they have a 10% chance of also having brown hair.

Given that a randomly selected person does not have brown eyes what is the probability that they also do not have brown hair?

## Shaq Free Throws

Over his career, Shaquille O’Neal made about 53% of his free throws. Assume his probability of making a single free throw is 53%. Suppose Shaq shot a round of 20 free throws and you’re told he made 15 of them.

- What is the likelihood he made the first free throw, given that he made 15?
- What is the likelihood he made at least 1 out of his first 5 free throws, given that he made 15?

## Loaded Dice

You have a pair of fair dice and a pair of loaded dice. But you forgot which pair is which. You do remember that when you bought the loaded dice, the company that makes them claimed the dice would land on a sum of 7 approximately 1/3 of the time.

- You choose one of the pairs at random and roll it once. You get a sum of 7. What is the likelihood that you picked the loaded dice?
- You choose one of the pairs at random and roll the pair three times. You get exactly one sum of 7. What is the likelihood that you picked the loaded dice?

## Repeated Quiz Questions

Each week you get multiple attempts to take a two-question quiz. For each attempt, two questions are pulled at random from a bank of 100 questions. For a single attempt, the two questions are distinct.

- If you attempt the quiz 5 times, what is the probability that within those 5 attempts, you’ve seen at least one question two or more times?
- How many times do you need to attempt the quiz to have a greater than 50% chance of seeing at least one question two or more times?

## Cognitive Dissonance Among Monkeys

Assume that each monkey has a strong preference between red, green, and blue M&M’s. Further, assume that the possible orderings of the preferences are equally distributed in the population. That is to say that each of the 6 possible orderings ( R>G>B or R>B>G or B>R>G or B>G>R or G>B>R or G>R>B) are found with equal frequency in the population. Lastly assume that when presented with two M&Ms of different colors they always eat the M&M with the color they prefer.

In an experiment, a random monkey is chosen from the population and presented with a Red and a Green M&M. In the first round, the monkey eats the one based on their personal preference between the colors. The remaining M&M is left on the table and a Blue M&M is added so that there are again two M&M’s on the table. In the second round, the monkey again chooses to eat one of the M&M’s based on their color preference.

- What is the chance that the red M&M is not eaten in the first round?
- What is the chance that the green M&M is not eaten in the first round?
- What is the chance that the Blue M&M is not eaten in the second round?

[Mattingly 2022]

## The chance a coin is fair

Suppose that I have two coins in my pocket. One ordinary, fair coin and one coin which has heads on both sides. I pick a random coin out of my pocket, throw it, and it comes up heads.

- What is the probability that I have thrown the fair coin ?
- If I throw the same coin again, and heads comes up again, what is the probability that I have thrown the fair coin ?
- If instead of throwing the same coin again, I reach into my pocket and throw the second coin. If it comes up heads, what is the chance the first coin is the fair coin ?

[ Modified version of Meester, ex 1.7.35]

## Conditionally equally Likely

Let \(A\) and \(B\) be two events with positive probability. When does \(\mathbf{P}(A|B)=\mathbf{P}(B|A)\) ?

## Picking a box then a ball

Suppose that there are two boxes, labeled odd and even. The odd box contains three balls numbered 1,3,5 and the even box contains two balls labeled 2,4. One of the boxes is picked randomly by tossing a fair coin.

- What is the probability that a 3 is chosen ?
- What is the probability a number less than or equal to 2 is chosen ?
- The above procedure produces a distribution on \(\{1,2,3,4,5\}\) how does it compare to picking a number uniformly (with equal probability) ?

[Pitman p 37, example 5]

## Finding a good phone

At the London station there are three pay phones which accept 20p coins. one never works, another works, while the third works with probability 1/2. On my way to London for the day, I wish to identify the reliable phone, so that I can use it on my return. The station is empty and I have just three 20p coins. I try one phone and it doesn’t work. I try another twice in succession and it works both times. What is the probability that this second phone is the reliable one ?

[Suhov and Kelbert, p.10, problem 1.9]

## Chance of Testing Positive

In a certain population of people 5% have a disease. Bob’s road side clinic use a test for the disease which has a 97% of (correctly) returning positive if one has the disease and a 25% chance of (incorrectly) returning a positive if one doesn’t have the disease. If a random person is given the test, what is the chance that the result is positive ?

Now let \(\alpha\) be the chance the test returns a positive if one doesn’t have the disease. (Leave the chance that the test correctly returns a positive is one has the disease at 97%). For what value of \(\alpha\) is the chance the test is correct equal to 5% for a randomly chosen person ?

## Linear regression

Consider the following model:

\(X_1,…,X_n \stackrel{iid}{\sim} f(x), \quad Y_i = \theta X_i + \varepsilon_i, \quad \varepsilon_i \stackrel{iid}{\sim} \mbox{N}(0,\sigma^2).\)

- Compute \({\mathbf E }(Y \mid X)\)
- Compute \({\mathbf E }(\varepsilon \mid X)\)
- Compute \({\mathbf E }( \varepsilon)\)
- Show \( \theta = \frac{{\mathbf E}(XY)}{{\mathbf E}(X^2)}\)

## Clinical trial

Let \(X\) be the number of patients in a clinical trial with a successful outcome. Let \(P\) be the probability of success for an individual patient. We assume before the trial begins that \(P\) is unifom on \([0,1]\). Compute

- \(f(P \mid X)\)
- \( {\mathbf E}( P \mid X)\)
- \( {\mathbf Var}( P \mid X)\)

## Conditioning and Polya’s urn

An urn contains 1 black and 2 white balls. One ball is drawn at random and its color noted. The ball is replaced in the urn, together with an additional ball of its color. There are now four balls in the urn. Again, one ball is drawn at random from the urn, then replaced along with an additional ball of its color. The process continues in this way.

- Let \(B_n\) be the number of black balls in the urn just before the \(n\)th ball is drawn. (Thus \(B_1= 1\).) For \(n \geq 1\), find \(\mathbf{E} (B_{n+1} | B_{n}) \).
- For \(n \geq 1\), find \(\mathbf{E} (B_{n}) \). [Hint: Use induction based on the previous answer and the fact that \(\mathbf{E}(B_1) =1\)]
- For \(n \geq 1\), what is the expected proportion of black balls in the urn just before the \(n\)th ball is drawn ?

[From pitman p 408, #6]

## Expectation of hierachical model

Consider the following hierarchical random variable

- \(\lambda \sim \mbox{Geometric}(p)\)
- \(Y \mid \lambda \sim \mbox{Poisson}(\lambda)\)

## Expectation of mixture distribution

Consider the following mixture distribution.

- Draw \(X \sim \mbox{Ber}(p=.3)\)
- If \(X=1\) then \(Y \sim \mbox{Geometric}(p_1)\)
- If \(X= 0\) then \(Y \sim \mbox{Bin}(n,p_2)\)

What is \(\mathbf{E}(Y)\) ?. (*) What is \(\mathbf{E}(Y | X )\) ?.

## Fishin’ time!

Stark’s Pond contains 10 trout and 5 bluegill fish. Kyle catches a random number of fish (call the number \(X\)), where \(X \sim \text{Unif}(\{1,\ldots,4\})\). Once caught, that fish is removed from the pond and cannot be caught again. Each new fish comes uniformly from the remaining fish.

(a) What is the chance that Kyle catches all trout?

(b) Suppose all the fish that Kyle caught were trout. Given this information, what is the probability that he caught exactly 5 fish?

[Author Mark Huber. Licensed under Creative Commons.]

## Algebras and Conditioning

Consider two draws from a box with replacement contain 1 red ball and 3 blue balls. Let \(X\) be number of red balls. Let \(Y\) be 1 if the two balls are the same color and 0 otherwise. Let \(Z_i\) be the random variable which returns 1 if the \(i\)-th ball is red.

- What is the sample space.
- Write down the algebra of all events on this sample space.
- What is the algebra of events generated by \(X\) ?
- What is the algebra of events generated by \(Y\) ?
- What is the algebra of events generated by \(Z_1\) ?
- What is the algebra of events generated by \(Z_2\) ?
- Which random variables are determined by an another of the random variables. Why ? How is this reflected in the algebras ?
- (*) What pair of random variables are independent ? How is this reflected in the algebras ?

## Conditional Poisson

The following is a hierarchical model.

- \(\lambda \sim Uniform[1,2]\)
- \(Y \mid \lambda \sim \mbox{Poisson}(\lambda)\)

What is \(\mathbf{E}(Y)\) ?

## Digital communications system

A digital communications system consists of a transmitter and a receiver. During each short transmission interval the transmitter sends a signal which is interpreted as a zero, or it sends a different signal which is to be interpreted as a one. At the end of each interval, the receiver makes its best guess at what is transmitted. Consider the events:

\(T_0 = \{\mbox{Transmitter sends } 0\}, \quad T_1 = \{\mbox{Transmitter sends } 1\} \)

\(R_0 = \{\mbox{Receiver perceives } 0\}, \quad R_1 = \{\mbox{Reviver perceives } 1\} \)

Assume that \(\mathbf{P}(R_0 \mid T_0)=.99\), \(\mathbf{P}(R_1 \mid T_1)=.98\) and \(\mathbf{P}(T_1)=.5\).

- Compute probability of transmission error given \(R_1\).
- Compute the overall probability of a transmission error.
- Repeat a) and b) for \(\mathbf{P}(T_1)=.8\).

[Pitman page 54, problem 4]

## Committee membership in the senate

A club contains 100 members; 51 are Democrats (or caucus with

Democrats) and 49 are Republicans. A committee of 10 members is

chosen at random.

- Compute the probability of Republicans on the committee for \(n=1,…,10\).
- Find the probability that the committee members are all the same party.
- Suppose you didn’t know how many Democrats there were in the senate. You observe that the committee of \(10\) members consists of \(k=7\) Democrats. Compute \(\mathbf{P}(M|k=7) \), where \(M\) is the number of Democrats in the Senate.

## Chance of an Accident.

An insurance company has 50% urban and 50% rural customers. If every year each urban customer has an accident with probability \(\mu\) and each rural customer has an accident with probability \(\lambda\). Assume that the chance of an accident is independent from year to year and from customer to costumer. This is another way to say, conditioned on being and urban or rural the chance of having an accident each year is independent.

A costumer is randomly chosen. Let \(A_n\) be the chance this customer has an accident in year \(n\). Let \(U\) denote the event that this costumer is urban and \(R\) the event that the customer is rural.

- Find \( \mathbf{P}(A_2|A_1) \).
- Are \(A_1\) and \(A_2\) independent in general ? Are there any conditions when it is true if not in general ?
- Show that \(\mathbf{P}(A_2|A_1) \geq \mathbf{P}(A_2) \).

To answer this question it is useful to know that for any positive \(a\) and \(b\), one has \( (a+b)^2 < 2(a^2 +b^2)\) as long as \(a \neq b\). In the case \(a = b\), one has of course \( (a+b)^2 = 2(a^2 +b^2)\). To prove this inequality, first show that \( (a+b)^2 +(a-b)^2= 2(a^2 +b^2)\) and then use that fact that \( (a-b)^2 >0 \). - Find the probability that a driver has an accident in the 3nd year given that they had one in the 1st and 2nd year.
- Find the probability that a driver has an accident in the \(n\)-th year given that they had one in all of the previous years. What is the limit as \(n \rightarrow \infty\) ?
- Find the probability that a diver is a urban diver given that they had an accident in two successive years.

## Duels

Mathematicians and politicians throughout history have dueled.

Alexander Hamilton and Aaron Burr dueled.

The French mathematician Evariste Galois died in a duel.

Consider two individuals (H) and (B) for example dueling.

In each round they simultaneously shoot the other and the probability

of a fatal shot is \(0 < p < 1\).

1) What is the probability they are fatally injured in the same round ?

2) What is the probability that (B) will be fatally injured before (H) ?