# Category Archives: Bernoulli Trials

## Point of increase

Suppose $$U_1,U_2, …$$ are independent uniform $$(0,1)$$ random variables. Let $$N$$ be the first point of increase. That is to say the first $$n \geq 2$$ such that $$U_n > U_{n-1}$$. Show that for $$u \in (0,1)$$:

1. $\mathbf{P}(U_1 \leq u \ { and } \ N=n)= \frac{u^{n-1}}{(n-1)!}-\frac{u^{n}}{n!} \quad;\quad n \geq 2$
2. $$\mathbf{E}(N)=e$$

Some useful observations:

• $\mathbf{P}(U_1 \leq u \ { and } \ N=n) = \mathbf{P}(U_1 \leq u \ { and } \ N \geq n) -\mathbf{P}(U_1 \leq u \ { and } \ N \geq n+1)$
• The following events are equal
$\{U_1 \leq u \quad{ and } \quad N \geq n\} = \{U_{n-1}\leq U_{n-2} \leq \cdots \leq U_2\leq U_{1} \leq u \}$
• $\mathbf{P}\{U_2 \leq U_1 \leq u \}= \int_0^u \int_0^{u_1} du_2 du_1$

## Blocks of Bernoulli Trials

In $$n+m$$ independent $$\text{Bernoulli}(p)$$ trials, let $$S_n$$ be the number of successes in the first $$n$$ trials and $$T_m$$ number of successes in the last $$m$$ trials.

1.  What is the distribution of $$S_n$$ ? Why ?
2. What is the distribution of  $$T_m$$ ? Why ?
3. What is the distribution of $$S_n+T_m$$ ? Why ?
4. Are $$S_n$$ and $$T_m$$ independent ? Why ?

[Pitman p. 159, # 10]

## Airline Overbooking

An airline knows that over the long run, 90% of passengers who reserve seats for a flight show up. On a particular flight with 300 seats, the airline sold 324 reservations.

1. Assuming that passengers show up independently of each other, what is the chance that the flight will be overbooked ?
2. Suppose that people tend to travel in groups. Would that increase of decrease the probability of overbooking ? Explain your answer.
3. Redo the  the calculation in the first question assuming that passengers always travel in pairs. Are your answers to all three questions consistent ?

[Pitman p. 109, #9]

## 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 ?

## Blocks of Bernoulli Trials

In $$n+m$$ independent  Bernoulli $$(p)$$ trials, let $$S_n$$ be the number of successes in the first $$n$$ trials, $$T_n$$ the number of successes in the last $$m$$ trials.

1. What is the distribution of $$S_n$$ ? Why ?
2. What is the distribution of $$T_m$$ ? Why ?
3. What is the distribution of $$S_n+T_m$$ ? Why ?
4. Are $$S_n$$ and $$T_m$$ independent ? Why ?
5. Are $$S_n$$ and $$T_{m+1}$$ independent ? Why ?
6. Are $$S_{n+1}$$ and $$T_{m}$$ independent ? Why ?

Based on [Pitman, p. 159, #10]