Title: Bernoulli and Binomial Distributions
1Bernoulli and Binomial Distributions
2Bernoulli Random Variables
- Setting
- finite population
- each subject has a categorical response with one
of 2 possible values (0/1) - pick a simple random sample of n1 subject
- Y random variable representing response (a
Bernoulli random variable)
Prob(Y1)
3Bernoulli Random Variables
- Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Response
- 0 normal weight
- 1 overweight
Population Parameters
Mean
Variance
4Bernoulli Random Variables
- Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Values
- 0 normal weight
- 1 overweight
Population Parameters
Mean
Variance
Pick a single subject at random
a Bernoulli Random Variable
5Bernoulli Random Variables
- Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Values
- 0 normal weight
- 1 overweight
a Bernoulli Random Variable
Probability
Event y P(y)
Normal 0 1-p
Overwt 1 p
Total 1
- events are mutually exclusive
- exhaustive
- probabilities sum to 1
6Bernoulli Random Variables
- Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Values
- 0 normal weight
- 1 overweight
Event y P(y)
Normal 0 1-p
Overwt 1 p
Total 1
a Bernoulli Random Variable
7Bernoulli Random Variables
- Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Values
- 0 normal weight
- 1 overweight
Simple random sample of n1
8Binomial Random Variable
- Binomial Random Variable The sum of independent
identically distributed Bernoulli random
variables. - Example Finite population of 100 subjects,
where 40 are normal weight and 60 are overweight.
- Values
- 0 normal weight
- 1 overweight
- Select a simple random sample of size n with
replacement - the random variable representing each selection
is a Bernoulli Random variables - the random variables are independent
- the random variables are identically distributed
- iid independent and identically distributed
(always occurs for random variables representing
selections using simple random sampling with
replacement)
a Binomial Random Variable
9Independent Variables
- Are the two random variables independent?
first selection in a sample
second selection in a sample (with Rep)
Two random variables are independent if for any
realized value of the first random variable, the
probability is unchanged for any realized value
of the second random variable.
10Independent Variables
- Are the two random variables independent?
first selection in a sample
second selection in a sample (with Rep)
Suppose
Conclusion The RVs are independent
11Independent Variables
- Are the two random variables independent?
first selection in a sample
second selection in a sample (without Rep)
a Bernoulli Random Variable
12Independent Variables
- Are the two random variables independent?
first selection in a sample
second selection in a sample (without Rep)
Suppose
Conclusion The RVs are not independent
13Binomial Random Variable
- Binomial Random Variable The sum of independent
identically distributed (iid) Bernoulli random
variables.
a Binomial Random Variable
a vector of Random Variables
14Expected Value and Variance of a Vector of Random
Variables
a vector of Random Variables
15Expected Value and Variance of a Vector of Random
Variables
a vector of independent Random Variables
zero covariances
a vector of independent and identically
distributed (iid)Random Variables
identity matrix
16Expected Value and Variance of a Linear
Combination of Random Variables
a Binomial Random Variable
a vector of independent and identically
distributed Bernoulli Random Variables
In general
17Variance of a Binomal Random Variables
18Expected Value and Variance of a Binomal Random
Variable
a Binomial Random Variable
a vector of independent and identically
distributed Bernoulli Random Variables
19Binomial Distribution
see table A.1 in Appendix of Text
n kX 0.4p
Xx
4 0 0.1785
1 0.3456
2 0.3456
3 0.1536
4 0.0256
20Binomial Distribution
see table A.1 in Appendix of Text
n k 0.6
4 4 0.1785
3 0.3456
2 0.3456
1 0.1536
0 0.0256
21SRS with rep Seasons Study
With Seasons Study, define High Total
Cholesterol TCgt240 Select SRS with
replacement Run SAS program ejs09b540p46.sas
Example Change Program to get 5 samples of size
n10 For each, calculate total TCgt240
22Binomial Distribution
What if 10,000 Samples were selected?
23Binomial Distribution
P(Xx with TCgt240) ( ways of ways of picking
samples with x)Pr(x success)P(n-x failures)
24Binomial DistributionLikelihood
We select a srs with replacement of n10 and
observe x4. What is p?
This is a function of p
25Binomial DistributionLikelihood
We select a srs with replacement of n10 and
observe x4. What is p?
Likelihood
Use table to find values for p
p L(p) p L(p)
0.05 0.001 0.40 0.2508
0.10 0.0112 0.45 0.2384
0.15 0.0401 0.50 0.2051
0.20 0.0881 0.55 0.1596
0.25 0.1460 0.60 0.1115
0.30 0.2001 0.65 0.0689
0.35 0.2377 etc
26Binomial DistributionMaximum Likelihood
Likelihood
p L(p) p L(p)
0.05 0.001 0.40 0.2508
0.10 0.0112 0.45 0.2384
0.15 0.0401 0.50 0.2051
0.20 0.0881 0.55 0.1596
0.25 0.1460 0.60 0.1115
0.30 0.2001 0.65 0.0689
0.35 0.2377 etc
Maximum Likelihood
0.2
0.1
0.05
0.2
0.3
0.4
0.5
27Binomial Distribution- Differences in Use
Usually report total instead of mean.
Mean
Total
Estimate
Variance
Estimated Variance
Use Normal CLT
28Binomial Distribution- Differences in Use
Mean
Total
Use Normal Dist for Interval Estimates
Approximation good when
and
29Binomial Distribution- Differences in Use
Use hypothesized p for variance when
and
30Binomial Distribution- CI for Difference in Prop.
Diff in Means (Proportions see 14.6)
31Binomial Distribution- Hyp. Test for Difference
in Prop.
Pooled prob
32Chi-Square Distribution Hyp. Test for Difference
in Prop.
Under the null hypothesis, this statistic follows
a chi-square distribution with 1 degree of
freedom.