Slide set 9 Stat 330 (Spring 2015) Last update: February 4, 2015

advertisement
Slide set 9
Stat 330 (Spring 2015)
Last update: February 4, 2015
Stat 330 (Spring 2015): slide set 9
Special discrete pmfs
Intuitive idea: In many theoretical and practical problems, several probability
mass functions occur often enough to be worth exploring.
Common feature: The sample space is always finite or countably many.
Example:
1. Bernoulli distribution
2. Binomial distribution
3. Geometric distribution
4. Poisson distribution
5. Compounded distribution
1
Stat 330 (Spring 2015): slide set 9
Bernoulli distribution
Situation: Bernoulli experiment (only two outcomes: success/failure) with
P ( success ) = p
We define a random variable X as:
X( failure ) = 0
X( success ) = 1
The probability mass function pX of X is then:
pX (0) = 1 − p
pX (1) = p
The random variable is said to follow Bernoulli distribution .
2
Stat 330 (Spring 2015): slide set 9
Bernoulli experiment: Examples
•
Toss a coin: Ω = {H, T }
•
Throw a fair die and ask if the face value is a six:
{face value is a six, face value is not a six}
•
Sent a message through a network and record whether or not it is
received: Ω = {successful transmission, unsuccessful transmission}
•
Draw a part from an assembly line and record whether or not it is
defective: Ω = {defective , good}
•
Response to the question “Are you in favor of the above measure”?
(in reference to a new tax levy to be imposed on city residents):
Ω = {yes, no}
Ω =
3
Stat 330 (Spring 2015): slide set 9
Bernoulli random variable (cont’d)
The cdf of the Bernoulli distribution, FX is then:


0
t<0
1−p 0≤t<1
FX (t) = P (X ≤ t) =

1
1≤t
This function is called the Bernoulli cumulative distribution function (cdf).
Expected value and Variance of a Bernoulli random variable:
P
• E(X) = pX (x) = 0(1 − p) + 1 · p = p
x
P
• Var(X) = (x − E(X))2pX (x) = (0 − p)2 · (1 − p) + (1 − p)2 · p
x
= p(1 − p)
4
Stat 330 (Spring 2015): slide set 9
Sequence of Bernoulli Experiments
A compound experiment consisting of n independent and identically
distributed Bernoulli experiments.
Example: Sequences of Bernoulli experiments
•
Toss a coin n times.
•
Send 23 identical messages through the network independently.
•
Draw 5 cards from a standard deck with replacement and record whether
or not the card is a king.
What does independent and identically distributed mean?
5
Stat 330 (Spring 2015): slide set 9
•
Saying that the trials are independent means, for example, that
P ( trial 1 a success and trial 2 a failure , and . . . trial k a failure) =
P ( trial 1 a success)P ( trial 2 a failure ) . . . P ( trial k a failure).
•
Saying that the trials are identically distributed means that
P ( trial 1 a success) = P ( trial 2 a success ) = . . .
= P ( trial k a success) = p
P ( trial 1 a failure) = P ( trial 2 a failure ) = . . .
= P ( trial k a failure) = q = 1 − p
•
Shorthand for independent and identically distributed is iid.
6
Stat 330 (Spring 2015): slide set 9
Binomial distribution
Situation: n sequential Bernoulli experiments, with success rate p for a
single trial. Single trials are independent from each other.
We are only interested in the number of successes in total after n trials,
random variable X is then:
X = “number of successes in n trials”
This leads to a sample space of
Ω = {0, 1, 2, . . . , n}
What is the general expression for pX (k) for all possible k = 0, . . . , n
pX (k) = P (X = k)
7
Stat 330 (Spring 2015): slide set 9
Derivation of Binomial pmf
We want to find the probability, that in a sequence of n trials there are
exactly k successes. If s is a particular sequence with k successes and n − k
failures, we already know the probability:
P (s) = pk (1 − p)n−k .
Think: Now we need to know, how many possibilities there are, to have k
successes in n trials: think of the n trials as numbers from 1 to n.
n
There are k possible ways of selecting k numbers out of the n possible
numbers. pX (k) is therefore (by summation rule):
n k
pX (k) =
p (1 − p)n−k .
k
This probability mass function is called the Binomial mass function.
8
Stat 330 (Spring 2015): slide set 9
Binomial distribution (cont’d)
Remark: Any Binomial variable X can be represented as a sum of iid
Bernoulli variables:
X = X1 + · · · + Xn
where Xi ∼ Bernoulli(p)
Expected value and Variance of Binomial random variable:
n
P
• E(X) =
E(Xi) = np
i=1
n
P
• Var(X) =
Var(Xi) = np(1 − p) (since X1, X2, . . . , xn are iid)
i=1
The cdf of X, FX is:
FX (t) = P (X ≤ t) =
btc X
n
i=0
i
pi(1 − p)n−i =: Bn,p(t)
9
Stat 330 (Spring 2015): slide set 9
Binomial distribution: Example
Example: Compute the probabilities for the following events:
A box contains 15 components that each have a failure rate of 5%. What
is the probability that
1. exactly two out of the fifteen components are defective?
2. at most two components are defective?
3. more than three components are defective?
4. more than 1 but less than 4 are defective?
Solution: First, let X be the number of defective components. Then we
say that X has a Bin(15, 0.05) distribution, for short.
10
Stat 330 (Spring 2015): slide set 9
Binomial distribution: Example (Continued...)
1. P
two out of the fifteen components are defective) = pX (2) =
(exactly
15
0.0520.9513 = 0.1348.
2
2. P (at most two components are defective) = P (X ≤ 2) = B15,0.05(2) =
0.9638.
3. P ( more than three components are defective ) = P (X > 3) = 1 −
P (X ≤ 3) = 1 − 0.9945 = 0.0055.
4. P ( more than 1 but less than 4 are defective ) = P (1 < X < 4) =
P (X ≤ 3) − P (X ≤ 1) = 0.9945 − 0.8290 = 0.1655.
11
Stat 330 (Spring 2015): slide set 9
Example from Baron
Example from Baron: As part of a business strategy, randomly selected
20% of new internet service subscribers receive a special promotion from
the provider. A group of 10 neighbors signs up for the service. What is the
probability that at least 4 of them get a special promotion?
Solution:
Need to calculate P (X ≥ 4) where X is the number of people out of 10
who will receive the special promotion.
Modelling X as the number of successes in 10 Bernoulli trials each with
P (success) = 0.2, we have that X ∼ Bin(10, 0.2)
Thus
P (X ≥ 4) = 1 − P (X ≤ 3) = 1 − B10,0.2(3) = 1 − 0.8791 = 0.1209
12
Stat 330 (Spring 2015): slide set 9
Geometric distribution
Situation:
1. We have a single Bernoulli experiment with probability for success p.
2. Now, we repeat this experiment until we have a first success.
3. Denote by X the number of repetitions of the experiment until we have
the first success, i.e X = k implies that, we have k − 1 failures and the first
success in the kth repetition of the experiment.
Question: It is very natural to ask what is the probability distribution of X?
Pmf: The sample space Ω is infinite and starts at 1 (we need at least one
success):
Ω = {1, 2, 3, 4, . . .}
and the pmf
p
pX (k) = P (X = k) = (1 − p)k−1 · |{z}
| {z }
k−1 failures
success!
13
Stat 330 (Spring 2015): slide set 9
Geometric distribution (cont’d)
This probability mass function is called the Geometric mass function.
Expectation and Variance of the Geometric random variable:
E[X] =
V ar[X] =
∞
X
1
p
= ,
i(1 − p) p = . . . =
2
(1
−
q)
p
i=1
i
∞
X
1
1−p
(i − )2(1 − p)ip = . . . = 2 .
p
p
i=1
The c.d.f. is given by :
FX (t) = 1 − (1 − p)btc =: Geop(t)
Proof: If X is greater than t, this means that the first btc trials yields
failures. This probability is easy to compute: just (1 − p)btc.
14
Download