Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of statistical inference methods for determining the difference between two population proportions or variances. It covers the concepts of confidence intervals and hypothesis tests, including the expected values, formulas, and critical values for independent sampling. The document also includes examples of calculating confidence intervals and performing hypothesis tests using given data.
Typology: Study notes
1 / 26
- Part
Difference
between
proportionsproportions
,
percentages,
fractions
or
rates;
compare
proportions
Qualitative
Data
1
2
2
1
2
1
) ( ) ˆ ˆ ( 2
1
2
1
p
p
p
p
E
−
=
−
)
(
)
(
2
1
2
1
p
p
p
p
2
2
2
1
1
1
2
2
2
1
1 1 ) ˆ ˆ (
ˆ ˆ ˆ ˆ 2 1
n
q
p
n
q
p
n
q
p
n
q
p
p
p
2
1
2
1
) ˆ ˆ ( 1 1 2 1 2
1
−
2
1
2 2 1 1 2 / 2 1 ˆ ˆ 2 / 2 1
p
p
α
α
2
2
1
1
2 1 2 / 2 1 2 / 2 1
2
1
p
p
−
α
α
2 1 2 / 2 1
α
1
2
0
1
2
0
a
1
2
0
0
0
1
2
0
a
1
2
0
a
1
2
0
0
o
α
a
1
2
0
o
α
/
0
2
1
)
ˆ
ˆ
(
o
D
p
p
z
−
−
=
⎞ ⎟⎟⎠
⎛ ⎜⎜⎝
≅
=
−
) ˆ ˆ ( 2 1
1
1
ˆ
ˆ
ˆ
with
2
1
q
p
x
x
p
n
n
p
p
n
σ
Conditions:
The
two
samples
must
be
independent
of
each
other.
)
ˆ
ˆ (
2
1
p
p
o
−
⎟⎠
⎜⎝
2 1 ) ( 2 1
2
1
n
n
n
n
n
n
p
p
n
The
sample
sizes
must
be
large,
i.e.
15
ˆ
and
15
ˆ
15
ˆ
and
15
ˆ
2
2
2
2
1
1
1
1
≥
≥
≥
≥
q
n
p
n
q
n
p
n
i
ti t d
id d t
l
t
th
i
l
f
it
t
th
li
ti
f
scientist
d
ecided
t
o
evaluate
th
e
survival
of
mites
t
o
th
e
application
of
a
new
insecticide.
Because
it
is
known
that
males
and
females
can
have
different
reactions
to
this
chemical
individuals
of
each
sex
were
l
t d Sh
l
t d
h i di id
l
it
i t
ll
i
f
li d
selected.
Sh
e
l
ocated
each
i
ndividual
mite
i
nto
a
small
piece
of
rug,
applied
the
recommended
dose
of
insecticide
and
after
hour
the
status
of
the
insect
(alive/dead)
was
recorded.
The
summary
table
is
shown
below:
Alive
Dead
TOTAL
Male
20
30
50
Female
5
45
50
TOTAL
25
75
100
a)
Obtain
a
90%
confidence
interval
for
the
population
difference
in
proportion
of
dead
mites
between
females
and
males.
b)
Conduct
a
test
to
evaluate
if
there
is
significant
difference
in
the
proportion
of
dead
mites
between
females
and
males.
Use
α
=
0.10.
Alive
Dead
TOTAL
Male
20
30
50
Female
5
45
50
TOTAL
25
75
100
a)
Obtain
a
90%
confidence
interval
for
the
population
difference
in
f
α
proportion
of
dead
mites
between
females
and
males.
m
=
=
m
m
f
f
q
p
q
p
=
=
−
m
f
p
p
n
n
m
f^
ˆ
ˆ
−
m
f^
p
p
m
f
ˆ
ˆ
2 /
σ
α
m
f
Alive
Dead
TOTAL
Male
20
30
50
Female
5
45
50
TOTAL
25
75
100
a)
Obtain
a
90%
confidence
interval
for
the
population
difference
in
f
α
proportion
of
dead
mites
between
females
and
males.
m
0812
0
40 .
0
60 .
0
10 .
0
90
. 0 ˆ ˆ ˆ ˆ ˆ
= × + × = + =
m
m
f
f
q
p
q
p
0812 .
0
50
50
ˆ
ˆ
= + = + = −
m
f
p
p
n
n
m
f
ˆ
ˆ
2 /
−
m
f^
p
p
m
f
σ
α
m
f^
p
p
f
Alive
Dead
TOTAL
Male
20
30
50
Female
5
45
50
TOTAL
25
75
100
b)
Conduct
a
test
to
evaluate
if
there
is
significant
difference
in
the
ti
f d
d
it
b t
f
l
d
l
U
0 10
60 .
0
50
/
30
ˆ
10 .
0
90 .
0
50
/
45
ˆ
=
=
=
=
=
f
p p
α
0
f
m
a
p
roportion
of
d
ead
mites
b
etween
f
emales
and
males.
U
se
α
=
0
.10.
60 .
0
50
/
30
m
p
a
=
=
m
f
m
f
n
n
n
x
x
ˆ p
)
ˆ
ˆ
(
=
⎞⎟ ⎟⎠
⎛⎜ ⎜⎝
=
−
m f n n p p n n q p m f
1
1
ˆ
ˆ
ˆ
)
ˆ
ˆ (
σ
=
−
=
−
)
ˆ
ˆ ( ˆ
)
ˆ
ˆ
(
m
f^
p
p
m
f
o
p
p
z
σ
Alive
Dead
TOTAL
Male
20
30
50
Female
5
45
50
TOTAL
25
75
100
b)
Conduct
a
test
to
evaluate
if
there
is
significant
difference
in
the
ti
f d
d
it
b t
f
l
d
l
U
0 10
60 .
0
50
/
30
ˆ
10 .
0
90 .
0
50
/
45
ˆ
=
=
=
=
=
f
p p
α
0
f
m
a
f
m
p
roportion
of
d
ead
mites
b
etween
f
emales
and
males.
U
se
α
=
0
.10.
60 .
0
50
/
30
m
p
a
f
m
75 . 0
100
45
30
ˆ
=
=
=
m
f
m
f
n
n
n
x
x
p
)
ˆ
ˆ
(
0866 . 0
50
1
50
1
25 . 0
75
. 0 1 1 ˆ ˆ ˆ
)
ˆ
ˆ (
=
⎞⎟ ⎠
⎛⎜ ⎝
×
=
⎞⎟ ⎟⎠
⎛⎜ ⎜⎝
=
−
m f n n p p n n q p m f σ
464 . 3
0866 . 0
60 .
0
90 . 0
ˆ
)
ˆ
ˆ
(
)
ˆ
ˆ (
=
−
=
−
=
−
m
f^
p
p
m
f
o
p
p
z
σ
3.464 = |
z
o
|
> z
α
/
=
Hence, we reject
H
0
.
Calculations
are
different
for
two
samples
as
we
have
two
sources
of
variability
With
a
g
iven
level
of
confidence,
and
a
specified
sampling
error
g
p
p
g
it
is
possible
to
calculate
the
required
sample
size.
Typically,
n
1
n
2
n
Sample
size
needed
to
estimate
μ
1
μ
2
Based
on:
2 1 2 1 2 1 x
x
−
σ
μ
μ
Given
α
and
the
sampling
error
required:
(^22)
2 1
2
2 /
)
(
)
(
z
α
(^22)
2 1
2
2
2 /
)
(
)
(
2
1
t
n
n
α
−
−
Estimates of
σ
1
2
and
σ
2
2
will be needed.
2
2 1 2 / 2 1
)
(
)
(
SE
z
n
n
α
=
=
2
2
1
2 /
2
1
)
(
)
(
SE
t
n
n
α
=
=
Estimates
of
σ
1
and
σ
2
will
be
needed.
For
small
sample
sizes,
we
use
t
α
/2,
n1+n
‐
2
and
an
iterative
process.
α^ SE
2
1
σ
σ
SE σ
α
2
1
σ
σ
σ
α
(^22)
2 1
2
2 /
z
α
2
2
2
2
2
1
2
2 1 2 / 2 1
n
n
z
n
n
n
α
(^2)
2
1
If
we
do
this
experiment
we
might
want
to
use
a
t
distribution
with
df = n
hence
and
df
n
1
n
2
hence
0.025,
38
and 21
97 .
20
0 50
)
80 .
0
80 .
0 (
024 .
2
2
2
2
2
2
1
≅ = + = = =
n
n
n
t
0.025,
40
=
0
.
2
How
about
the
power of
the
test?
This
needs
to
be
checked
too!
(later)
Sample
size
needed
to
estimate
p
1
p
2
Based
on:
) ˆ ˆ ( 1 1 2 1 2
1
−
Given
α
and
the
sampling
error
required:
) ( 1 1 2 1 2
1
2
2
2 2 1 1 2 2 / 2 1
α
Estimates
of
p
1
and
p
2
will
be
needed!
Use
conservative
values
of:
p
1
p
2
For small sample sizes we do not use t but we need the general
‐
For
small
sample
sizes
we
do
not
use
t
but
we
need
the
general
condition:
1
ˆ
d
1
ˆ
15
ˆ
and
15
ˆ
1
1
1
1
≥
≥
q
n
p
n
1
5
ˆ
and
15
ˆ
2
2
2
2
≥
≥
q
n
p
n
Ratio
of
variances;
difference
in
variability
or
spread;
compare
variation
Quantitative
Data
2
(^2122)
σ σ
2 1 s
(^22) 1 s
(^22)
2 1
2 1
2 1
2 1
2
2
2
2
1
1
(^22)
2 1
(^22)
(^22)
2
2
1
1
(^22)
2
1
1
2
(^22)
2 1
Ob
i
i
f
l
i
2
2
2
Ob
tain
ratio
of
sample
variances
o
s
1
2
s
2
2
s
1
s
2
2
(for
convenience
the
larger
sample
variance
is
put
in
the
numerator)
For
a
given
obtain:
(l
/
i
th
t il)
U
a
/2,
n
‐
1,
n
‐
1
(leaves
α
/
i
n
th
e
upper
t
ail)
L
1
‐
a
/2,
n
‐
1,
n
‐
1
a
/2,
n
‐
1,
n
‐
1
(leaves
α/
in
the
lower
tail)
Compute (
α
Compute
α
⎤ ⎥ ⎦
⎡ ⎢ ⎣
U
L
F
s s
F
s s
2 2 1
2 2 1
,
Conclude
population
variances
are unequal if interval does not
⎦
⎣
s
s
2
2
are
unequal
if
interval
does
not
contain
2
2 2 2
s
n^ x
1
1 1 1
s
n^ x
2
2
s
1
1
s
2
2 2 2
s
n^ x
1
1 1 1
s
n^ x
2
2
1
1
(^222) 1
0
s s
U
a
/2, n1-1, n2-
L
1-
a
/2,
n1-1, n2-
=
⎤
⎡
2
2
=
⎤ ⎥ ⎦
⎡ ⎢ ⎣
U
L
F
s s
F
s s
(^222) 1
(^2122)
,
Critical values of theCritical
values
of
the
F
‐
distribution
(
α
=
0.025)
2
2 2 2
s
n^ x
1
1 1 1
s
n^ x
2
2
1
1
2 2
(^2122)
0
s s
U
a
/2, n1-1, n2-1
F
0.025, 49, 49
= 1.762
L
1-
a
/2,
n1-1, n2-1
= 1/
F
0.025, 49, 49
= 1/ 1.762 = 0.567
2
2
⎤
⎡
133 .
3 ,
009 .
1
762 .
1
778 .
1 ,
567 .
0
778 .
1
,
(^222) 1
(^2122)
=
×
×
=
⎤ ⎥ ⎦
⎡ ⎢ ⎣
U
L
F
s s
F
s s
2
2
2
2
0
1
2
a
1
2
2
2
0
1
2
a
1
2
2
2
0
data
drug;
data
drug;
input
Sample
$
Resp
@@;
datalines; 1
10.74
2
9.50
1
10.03
2
10.11
1
10.68
2
9.31
proc
ttest
data=drug
alpha=0.05;
class
Sample;
var
Resp;
run;
... 1
10.73
2
9.87
1
10.10
2
9.73
1
10.67
2
9.65
;
≅
1.778
(^22)
2 1
(^22)
2 1
(^22)
2 1
0
σ
σ
σ
σ
σ
σ
a
(^22)
2 1
(^22)
2 1
0
σ
σ
σ
σ
a
(^22)
2 1
2 2 2
0
σ
σ
a
if
s
(^2) max
s
(^22)
2 1
2 1 2
0
2
1
(^21)
0
σ
σ
a a
if
s s
f
s
max^2 min
0
s
2 s
α
F
0
2 /
0
α
F
(for
convenience
the
larger
sample
variance
is
put
in
the
numerator)