Home » Articles posted by sayan@stat.duke.edu (Page 2)
Author Archives: sayan@stat.duke.edu
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\).
- 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) \]. - 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 ?
Taking classes
There are 18 students in a room. How many students are not majoring in math or science or computer science ?
7 of them are math majors
10 of them are science majors
10 of them are computer science majors
4 of them are math and cs majors
3 of them are science and math majors
5 of them are cs and science majors
1 of them is a math, cs and science major
Chewing gum
Baseball players are chewing gum. Given gum flavor counts determine how many players were sampled.
22 of them chew fruit flavored gum
25 of them chew spearmint flavored gum
39 of them chew grape flavored gum
9 of them chew fruit and spearmint
17 of them chew spearmint and grape
20 of them chew fruit and grape
6 of them chew all
4 of them chew none
Birthday problem
The birthday problem is a classic problem in probability.
Given \(n\) people in a room what is the probability that at least two of them have the same birthday ?
- Compute \(\mathbf{P}(n)\) assuming that a person being born on any day is equal.
In blogs Andy Gelman and Chris Mulligan talk about how the uniformity assumption may be incorrect and the effect this has on the birthday problem.
- Chris examined the uniformity assumption by looking at CDC data for one year in terms of number of births. He provides R code (that I slightly adapted) that you can run in RStudio to plot the number of births through the year. How different is this from uniform ?
- Given this observed distribution he then computes the difference between the result of the birthday problem given the observed distribution versus a uniform distribution. This is done using Monte Carlo simulation in R (again slightly adapted by me). Does the deviation from the uniform distribution have a strong effect ?
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) ?
Two die
Two dice are rolled. Find the probabilities of the following events.
a) the maximum of the two numbers rolled is less than or equal to 2;
b) the maxinum of the two numbers rolled is less than or equal to 3;
c) the maximum of the two numbers rolled is exactly equal to 3;
d) Repeat b) and c) with 3 replaced by \(x=1,…,6\);
e) Denote \( \mathbf{P}(x)\) as the probability that the maximum number is exactly \(x\).
Compute \( \sum_{x=1}^6\mathbf{P}(x)\).
[Pitman Page 10, #7]
Pathway enrichment
A list of \(100\) genes are known to be part of the oxidative phosphorylation pathway.
My friend a molecular biologist screened the activity of \(5000\) genes in both diabetics and normal individuals.
He/she found \(500\) genes that were more active in normal individuals than diabetics.
Of these genes \(60\) of them belong to the list of genes that are part of the oxidative phosphorylation pathway.
What is the probability of this even happening randomly ? What is the scientific question behind the probability problem ?
Drawing tickets
A box contains tickets marked \(1,2,…,n\). A ticket is drawn at random from the box.
Sampling with replacement — Then the ticket is replaced in the box and a second ticket is drawn at random. Find the probability of the following events:
a) the first ticket drawn is numer 1 and the second is number 2;
b) the numbers on the two tickets are consectutive integers;
c) the second number drawn is bigger than the first number.
Sampling without replacement — The ticket is not replaced in the box and a second ticket is drawn at random.
d) Repeat a)-c).
[Pitman page 9, Problem 3]
Seating people
In how many ways can \(6\) people be seated in \(11\) vacant chairs that are arranged in a row ?
Inclusion of origin
Draw \(n\) points from the uniform distribution on the circle and draw the convex hull around these points. What is the probability that the origin (center of the circle) is contained in the convex hull ?
[From: The Probabilistic Method by Alon and Spencer]
Card matchings
Given two decks of \(n\) cards what is the probability that at least one of a pair of cards matches ?
Imagine the two decks of cards lined up, consider the event \(A_i\) to be that the \(i\)-th cards in the two decks match.
- Compute \[ \mathbf{P}(\bigcup_{i=1}^n A_i)\].
- (**)compute \[ \lim_{n\rightarrow \infty} ( \mathbf{P}( \bigcup_{i=1}^n A_i )\]
Monty Hall
Consider the Monty Hall problem:
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1 [but the door is not opened], and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?
(You have observed that week after week on this show, the host always opens a door to revival a goat before giving you the option to switch)
- Without using conditional probabilities work out the probability of winning if you switch versus if you don’t.
- Compute the same probabilities using conditional probabilities.
- Now assume that the host is cruel. He only offers you a switch when you have chosen the car. (You figure this out by watching the show on TV before going.) Now should you switch when offered the chance ?
- Now lets assume that every morning the host gets up and with probability \(p\) acts like the original host and with probability \(1-p\) he acts like the cruel host from the previous question.
- Now what is the chance of wining if you switch ?
- Now what is the chance of wining if you don’t switch ?
- For which \(p\) should you switch and which \(p\) should you not switch ?
- Now let us assume that host just picks a door randomly after you have picked yours. If there is a car behind it the came is over. If there is a goat, he offers you the chance to switch. Should you switch when you have the chance ? why ?
Counting and geometry
1) How many ways can one order \(n\) people on a line ?
2) How many ways can one order \(n\) people on a circle or round table (note that rotations are considered equivalent )?
3) How many ways can one order \(n\) people on a circle or round table with invariance with respect to rotations and direction (clockwise versus counter-clockwise) ?
Sums of normals
- Consider a normal random variable \(X\) with mean \(\mu_1\) and standard deviation \(\sigma_1\)
- Consider a normal random variable \(Y\) with mean \(\mu_2\) and standard deviation \(\sigma_2\).
Assume that \(X\) and \(Y\) are independent and define \(Z=X+Y\)
- What is the distribution of \(Z\) ?
- What is the mean and variance of \(Z\) ?
- (**) If we now assume that they are not independent, but still normal as described above, what can you say ?