Home » Basic probability » Bayes Theorem

Category Archives: Bayes Theorem

Telephone Calls throughout the Week

Telephone calls come in to a customer service hotline. The number of calls that arrive within a certain time frame follows a Poisson distribution. The average number of calls per hour depends on the day of the week. During the week (Monday through Friday) the hotline receives an average of 10 calls per hour. Over the weekend (Saturday and Sunday) the hotline receives and average of 5 calls per hour. The hotline operates for 8 hours each day of the week. (The number of calls on one day is independent of the numbers of calls on other days.)

  1. What is the probability that the center receives more than 500 calls in 1 week?
  2. Each person who calls the center has a 20% chance of getting a refund (independent of other callers). Find the probability that 10 or fewer people get a refund on Tuesday.
  3. One day of the week is chosen uniformly at random. On this day, a representative at the call center reports that 60 people called in. Based on that information, what is the probability that the day was a weekend day (either Saturday or Sunday)?

Magic Die (or is it rigged?)

A magician claims to have a magic die. If the die is rolled and lands on an even number, then the next time the die is rolled it will land on an odd number (and vice versa). So, as the die is rolled it will alternate perfectly between even and odd numbers (or so the magician claims).

You, being skeptical, figure there’s a 1 percent chance that the die is magical and a 99 percent chance that it’s just an ordinary fair die. You then ask the magician to “prove” the die is magical by rolling it some number of times.

How many successfully alternating rolls will it take for you to think there’s a 99 percent chance the die is magical (or, more likely, that it’s rigged in some way so it always alternates)?

Identifying a Biased Coin

You have a fair coin and a biased coin, but you can’t tell which is which. The biased coin lands on heads 75% of the time. You decide to try to determine which coin is the biased coin by selecting one of the coins at random and flipping tn 100 times. Let \(\hat{p}\) be your observed fraction of heads. Based on \(\hat{p}\), you decide which coin is the biased one.

  1. For which values of \(\hat{p}\) will you assume the coin you flipped is the biased coin?
  2. What is the probability that you correctly determine which coin is the biased coin?

Boxes with Yellow and Green Balls

Three boxes contain yellow and green balls

  • Box 1 contains 2 yellow balls.
  • Box 2 contains 2 green balls.
  • Box 3 contains 1 yellow ball and 1 green ball.

One box is selected at random, and one ball is pulled out of that box.

  1.  The ball that is pulled out of the chosen box is yellow. What is the probability that the other ball in that same box is also yellow?
  2. Let \(A\) be the event that Box 3 is chosen. Let \(B\) be the event that a yellow ball is pulled out of the chosen box. Are \(A\) and \(B\) independent?
  3.  The ball that is pulled out of the chosen box is yellow. Without replacement, a second ball is chosen at random from one of the three boxes. (Each box has a 1/3 chance of being selected.) What is the probability that the second ball chosen is also yellow?

Ball in Boxes

Suppose you have three boxes, \(Box_1,Box_2,Box_3\), such that \(Box_i\) contains \(i\) white balls and one black ball.

You will to select one ball from the boxes. Here are two schemes you could use for selection:

  1. Select one box uniformly at random. Pull one ball from that box. Or,
  2. Dump all the balls into one box. Mix them up. Pull out one ball.

Are these two schemes probabilistically equivalent?

Suppose instead of selecting a box uniformly at random, you select \(Box_i\) with probability \(p_i\). Find a list of values for \(p_1, p_2,\) and \(p_3\) that would make this new scheme probabilistically equivalent to scheme 2?

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.

  1. 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?
  2. 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?

Which deck is rigged ?

Two decks of cards are sitting on a table. One deck is a standard deck of 52 cards. The other deck (called the rigged deck)  also has 52 cards but has had 4 of the 13 Harts replaced by Diamonds. (Recall that a standard deck has 4 suits: Diamonds, Harts, Spades, and Clubs. normal there are 13 of each suit.)

  1. What is the probability one chooses 4 cards from the rigged deck and gets exactly 2 diamonds and no hearts?
  2. What is the probability one chooses 4 cards from the standard deck and gets exactly 2 diamonds and no hearts?
  3. You randomly chose one of the decks and draw 4 cards. You obtain exactly 2 diamonds and no hearts.
    1. What is the probability you chose the cards from the rigged deck?
    2. What is the probability you chose the cards from the standard deck?
    3. If you had to guess which deck was used, which would you guess? The standard or the rigged ?

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.

  1. What is the probability that I have thrown the fair coin ?
  2. If I throw the same coin again, and heads comes up again, what is the probability that I have thrown the fair coin ?
  3. 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]

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]

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

  1. \(f(P \mid X)\)
  2. \( {\mathbf E}( P \mid X)\)
  3. \( {\mathbf Var}( P \mid X)\)

Human error is the most common kind

Permanent Memories has three employess who burn Blu-ray discs.  Employee 1 has a 0.002 chance of making an error, employee 2 has a 0.001 chance of making an error, and employee 3 has a 0.004 chance of making an error.   The employees burn roughly the same number of discs in a day.

(a) What is the probability that a randomly chosen disc has an error on it?

(b) Given that a disc has an error, what is the probability that employee 1 was the culprit?

(c) Given that a disc has an error and employee 3 was on vacation the day it was burned, what is the probability that employee 2 was the culprit?

[Author Mark Huber. Licensed under Creative Commons.]

Drug testing with Bayes’ Rule

A new drug for leukemia works 25% of the time in patients 55 and older, and 50% of the time in patients younger than 55.  A test group consists of 17 patients 55 and older and 12 patients younger than 55.

(a) A patient is chosen uniformly at random from the test group, the drug is administered, and it is a success.  What is the probability the patient was in the older group?

(b) A subgroup of 4 patients are chosen and the drug is administered to each.  What is the probability that the drug works in all four patients?

[Author Mark Huber. Licensed under Creative Commons.]

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\).

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

[Pitman page 54, problem 4]

 

Conditional risk

Explain the linked picture.

Biased coins

Given a random variable \(x = \{ 0,1\} \) where \(0\) corresponds to heads and \(1\) corresponds to tails.

For a single coin flip: \( \mathbf{P}(x \mid p) = p^x(1-p)^{1-x}\).

For a sequence of \(n\) coin flips: \( \mathbf{P}(x_1,…,x_n \mid p) = \prod_{i=1}^n p^{x_i}(1-p)^{1-x_{i}}\).

I have a bag with three types of coins with the following probabilities of drawing each type:

\( \mathbf{P}(p=.5) = .7 \),  \( \mathbf{P}(p=.1) = .2 \), \( \mathbf{P}(p=.9) = .1 \).

I draw a coin from the bag. I flip it \(n\) times resulting in a sequence \(X_1,…,X_n\).

 

  1. Using Bayes rule provide the formula for
    \[ \mathbf{P}(p = .1 \mid x_1,…,x_n),\quad
    \mathbf{P}(p = .5 \mid x_1,…,x_n), \quad\text{and}\quad
    \mathbf{P}(p = .9 \mid x_1,…,x_n) \].
  2. If  \(x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8)=(1,1,0,1,1,0,0,1)\) what is the most likely value  probability \(p \) of the coin the was used ?

 

 

 

The chance of being English

English and American spellings are rigour and rigor, respectively. An English speaking guest staying at a Paris hotel writes the word and chose a letter at random from his spelling. The letter turns out to be a vowel. (that is any of : e,a,i,o,u). If 40% of the English speaking guests are American and 60% are English, what is the probability that the writer is American ?

 

 

 

[Ross, p. 107 #29]

Leukemia Test

A new drug for leukemia works 25% of the time in patients 55 and older, and 50% of the time
in patients younger than 55. A test group has 17 patients 55 and older and 12 patients younger than 55.

  1. A uniformly random patient is chosen from the test group, and the drug is administered and it is a success. What is the probability the patient was 55 and older?
  2. A subgroup of 4 patients are chosen and the drug is administered to each. What is the probability that the drug works in all of them?

 

Topics