Chapter 6
Chapter 6
Statistics for
Social Sciences
Chapter 6
Random Variable
Represents a possible numerical value from
a random experiment
Random
Variables
That is;
4 possible outcomes
Probability Distribution
T T x Value Probability
0 1/4 = .25
T H 1 2/4 = .50
2 1/4 = .25
H T
Probability
.50
.25
H H
0 1 2 x
Probability Distribution
Required Properties
P(x) 1
x
F(x 0 ) P(X x 0 )
In other words,
F(x 0 ) P(x)
xx0
Properties of F(X0)
E[g(X)] g(x)P(x)
x
x P(x)
Example: Toss 2 coins, 0 .25
x = # of heads, 1 .50
σ E(X μ) (x μ) P(x)
2 2 2
σ σ2
x
(x μ)2
P(x)
Shortcut for variance formula
Var(X) = s²
= E(X²) – m²
= S X² P(X) – m²
Standard Deviation Example
σ x
(x μ)2
P(x)
E(c) = c V(c) = 0
E(cX) = cE(X) V(cX) = c²V(X)
E(cX+Y)= cE(X)+E(Y) V(cX+Y)= c²V(X)+V(Y)
E(X-cY)= E(X)-cE(Y) V(X-cY)= V(X)+c²V(Y)
CE4,1: Consider the following probability distribution function (pdf). Let X denotes number of cars sold in a
day.
X 0 1 2 3 4 5 6
P(X) 0.07 0.19 0.23 0.17 0.16 0.14 0.04
a) What is P(X>3) =?
b) P(2<X<5) = ?
c) P(X≥2) = ?
d) P(X<6) = ?
CE4,2: Suppose that the PDF for the number of errors, X, on pages from business textbook is
CE4,3: Consider the following probability distribution function (pdf). Let X denotes number of cars
sold in a day.
X 0 1 2 3 4 5 6
P(X) 0.07 0.19 0.23 0.17 0.16 0.14 0.04
Bernoulli Normal
Binomial
Hypergeometric
Bernoulli Distribution
Bernoulli Distribution
The mean is µ = P
S S S……S S F F F……F F
Probability of observing this sequence is
p*p* ….p(1-p)*(1-p)*……*(1-p)
n!
C
n
x! (n x)!
x
S S S……S S F F F……F F
Probability of observing this sequence is
p*p* ….p(1-p)*(1-p)*……*(1-p)
𝑛
P(X)= 𝑋
px(1-p)n-x
Example
The random variable X represents the number of students
who prefer news from the Internet among a random
sample of students from a large university. If the
population proportion of students who prefer Internet
news is 0.6. And, if we relabel the outcome “Internet” as
a success ( S ) and “not Internet” as a failure (F). List the
associated probabilities, and the value of X for the
elementary outcomes of sampling 4 students.
Example: Answer
𝑛
P(X)= 𝑋
px(1-p)n-x
Binomial Distribution Formula
n! X nX
P(x) P (1- P)
x ! (n x )!
P(x) = probability of x successes in n trials,
with probability of success P on each trial
Example: Flip a coin four
times, let x = # heads:
x = number of ‘successes’ in sample,
n=4
(x = 0, 1, 2, ..., n)
P = 0.5
n = sample size (number of trials
or observations) 1 - P = (1 - 0.5) = 0.5
P = probability of “success” x = 0, 1, 2, 3, 4
Example:
Calculating a Binomial Probability
What is the probability of one success in five
observations if the probability of success is 0.1?
x = 1, n = 5, and P = 0.1
n!
P(x 1) P X (1 P)n X
x! (n x)!
5!
(0.1)1(1 0.1)51
1!(5 1)!
(5)(0.1)(0.9)4
.32805
Binomial Distribution
The shape of the binomial distribution depends on the
values of P and n
Mean P(x) n = 5 P = 0.1
.6
Here, n = 5 and P = 0.1 .4
.2
0 x
0 1 2 3 4 5
P(x) n = 5 P = 0.5
Here, n = 5 and P = 0.5 .6
.4
.2
0 x
0 1 2 3 4 5
Binomial Distribution
Mean and Variance
Mean
μ E(x) nP
Variance and Standard Deviation
σ nP(1- P)
2
σ nP(1- P)
Where n = sample size
P = probability of success
(1 – P) = probability of failure
Binomial Characteristics
Examples
μ nP (5)(0.1) 0.5
Mean P(x) n = 5 P = 0.1
.6
.4
σ nP(1- P) (5)(0.1)(1 0.1) .2
0.6708 0 x
0 1 2 3 4 5
5
P(X=5)= P(X)= 5
(0.4)5(1-0.4)0 =0.0102= 1%
b) What is the probability that the Cubs will win a majority of five games?
P(X≥3)= P(X=3)+P(X=4)+P(X=5)
= 53 (0.4)3(1-0.4)2 + 54 (0.4)4(1-0.4)1 + 5
5
(0.4)5(1-0.4)0 =0.3174= 32%
c) If the Cubs win the first game, what is the probability that they will win a majority of five games?
d) Before the series begins, what is the expected number of Cubs wins in these five games?
Mean=np=5(0.4)=2 games
e) If Cubs win the first game, what is the expected number of Cubs wins in these five games?
S! (N S)!
CSxCNnxS x! (S x)! (n x)! (N S n x)!
P(x) N
Cn N!
n!(N n)!
Where
N = population size
S = number of successes in the population
N – S = number of failures in the population
n = sample size
x = number of successes in the sample
n – x = number of failures in the sample
Hypergeometric Distribution
Mean and Variance
Mean = E(X)=m n(S/N)
Variance =Var(X) = s² = n(S/N)(1-S/N)*((N-n)/(N-1))
N=16 n=4
X=number of defectives in the sample
Decision rule: Reject shipment if X≥1 and accept
shipment if X=0
Solution: CE4,5
N=16 n=4 X=number of defectives in the sample
Decision rule: Reject shipment if X≥1 and accept shipment if X=0
S=4
4 12
0 4
P(accept)=P(X=0)= 16 = 0.29
4
S=1
1 15
0 4
P(accept)=P(X=0)= 16 = 0.75
4
S=1
P(reject)=1-P(accept) = 1- 0.75 =0.25
Discuss: CE4,6 & CE4,7
CE4,6: An analyst predicted that 3.5% of all small corporations
would file for bankruptcy in the coming year. For a random sample
of 100 small corporations, estimate the probability that at least 3
will file for bankruptcy in the next year.