Statistical Inference
Statistical Inference
Statistics
Descriptive
statistics
Statistics Estimation
Inferential Hypothesis
statistics Testing
Modeling,
Predicting
x , s , pˆ
Sample
Data
x
0.4052
= 143 150
= 29
Z
Dr. Mohammed Alahmed 18
2. if 36 different women are randomly selected, find the
probability that their mean weight is greater than 150
lbs.
P ( X 150 ) . 07
Sampling distribution
29
X
36
0.0735
z = 150-143 = 1.45
4.33
= 143 150
= 4.33
Z
Upper
Lower
Confidence Point Estimate
Confidence
Limit Limit
Width of confidence interval
in our estimates).
−z* z*
x z /2
x z /2
n n
α .475 .475 α
.025 .025
2 2
Z= -1.96 0 Z= 1.96 Z
Lower Upper
Confidence PointPoint
Estimate Confidence
Limit Estimate Limit
μl μu μ
Dr. Mohammed Alahmed 28
Case 2: Interval Estimation of μ when X is
not normally distributed but σ is known
s s
x t / 2 ,n 1
x t / 2 ,n 1
n n
where t
/ 2 ,n 1
s 𝟎.𝟎𝟕𝟗𝟗𝟐
S = 0.07992 = = 𝟎. 𝟎𝟏𝟓𝟑𝟖
n √𝟐𝟕
Dr. Mohammed Alahmed
34
Conclusion:
We are 95% confident that the true mean of LVEF will be
contained in the interval ( 0.1925, 0.2557)
Dr. Mohammed Alahmed 35
Estimation of the Variance of a
Distribution
Point Estimation
• Let X1, . . . , Xn be a random sample
from some population with mean μ and
variance σ2.
• The sample variance S 2 is an
unbiased estimator of σ2 over all
possible random samples of size n that
could have been drawn from this
population; that is, E(S 2) = σ2.
^ p
pq
^
p
p n
p̂ (1 p̂ ) p̂ (1 p̂ )
p̂ z /2 p p̂ z /2
n n
• Hypothesis:
– Null Hypothesis H0 : μ = μ0
– Alternative hypothesis H1: μ < μ0 or
H1: μ > μ0
• Identify level of significance
– α is a predetermined value (e.g., = .05)
– If is unknown, or if X - o
t
sample size is small s
n
• Right-tailed Test
– Reject H0 if Z > Z1-α (when use Z - test)
– Reject H0 if t > t1-α,n-1 (when use T - test)
– If is unknown, or if X -
t
o
X - o 146 140 6
Z = 2.78
s 27
2 . 1548
n 157
• Decision:
– Since 2.78 > 2.33.
then we reject H0
H0 :μ = 165
H1: μ < 165
Analyze Compare
Means One-
Sample T Test
Sample standard
dev.
p 0 (1 p 0 )
n
• Alternative Hypotheses:
H : p po H 1 : p po H :p p
A 1 o
Dr. Mohammed Alahmed 66
• Decision Rule:
If H1: P ≠ P0
Reject H 0 if Z > Z1-α/2 or Z < - Z1-α/2
If H1: P > P0
Reject H0 if Z > Z1-α
If H1: P < P0
Reject H0 H0 if Z < - Z1-α
Conclusion:
Z1-α = Z0.95 = 1.64
H 1 : o
α/2 α/2
χ2
χ2n-1, α/2 χ2n-1,1- α/2
X2
10.982 36.781
At = 0.05, there is not enough
evidence to reject the claim that
From Chi-square Table
the variance of the float time is 5
seconds.
Dr. Mohammed Alahmed 76
Hypothesis Testing: Two-Sample
Inference
• A more frequently encountered
situation is the two-sample hypothesis-
testing problem.
• In a two-sample hypothesis-testing
problem, the underlying parameters of
two different populations, neither of
whose values is assumed known, are
compared.
• Distinguish between Independent and
Dependent Sampling.
di = xi2 − xi1.
• The hypothesis testing problem can thus
be considered a one-sample t test based
on the differences (di ).
• Using SPSS
– After Importing your dataset, and
providing names to variables, click
on:
Since the exact two-sided p-value = .009 < 0.05, we reject the null
hypothesis.Therefore, we can conclude that starting OC use is associated
with a significant change in blood pressure.
sd sd
d t
, d t
n 1 ,1 n 1 ,1
2 n 2 n
sp
2 1 1
n1 n 2 2
t
(x 1
x2 ( 1 2
1 1
sp
n1 n2
1 1 1 1
[( x1 x 2 t
n 1 n 2 2 ,1
2
Sp
n1
n2
, ( x1 x2 t
n 1 n 2 2 ,1
2
Sp
n1
n2
]
(s (s n
2 2 2 2
n1
1
2 2
(n1 1 (n 2 1
2 2 2 2
[( x1 x 2 t
v ,1
2
s1
n1
s2
n2
, ( x1 x2 t
v ,1
2
s1
n1
s2
n2 ]
Perform t-test
assuming
unequal
Perform F-test variances
for the equality
of two variances Perform t-test
assuming
equal
variances
Dr. Mohammed Alahmed 97
Example
n1 n 2
338 292
pˆ 1 0 .4225 and pˆ 2 0 .3893 . Thus,
800 750
We fail to reject
the null hypothesis.
pˆ 1 (1 pˆ 1 pˆ 2 (1 pˆ 2 pˆ 1 (1 pˆ 1 pˆ 2 (1 pˆ 2
( pˆ 1 pˆ 2 z , ( pˆ 1 pˆ 2 z
2
n1 n2 2
n1 n2
Is n ≥ 30 ? Is σ known?
No Yes No Yes
Use non-
parametrics Use z-test Use t-test Use z-test
test