mfs p iscrete d

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