You are on page 1of 4

# Statistics Cheat Sheet

This is a case for testing two population proportions. Here, two groups in the
form of large independent samples (with a common characteristic – a headache
in this case) are being compared: The Viagra group and the placebo group. Let
the Viagra group be the first group and the placebo group be the second group.
Hence, n1 = 734 and n2 =725.

## Let the sample proportions be denoted as p̂1 (proportion of subjects who

experienced headaches for the Viagra group) and p̂2 (proportion of subjectswho
experienced headaches for the placebo group).

## p̂ = (number in Viagra group with headaches + number in placebo group with

headaches) / (total number in viagra group + total number in placebo group)

## p̂ = (734*0.16 + 725*0.04) / (734 + 725) = (117 + 29) / (734 + 725)

p̂ = 0.10

1 1
Standard error = √p̂ (1 − p̂) ∗ [( ) + ( )] =
n1 n2

1 1
√0.10 (1 − 0.10) ∗ [( ) + (725)] = √0.09 ∗ [0.001362 + 0.0013793] =
734

Difference between the two sample proportions = p̂1 - p̂2 = 0.16 – 0.04 = 0.12

The null hypothesis states that the two population proportions are equal (the rate
of occurrence of a headache is the same among the Viagra and placebo groups) :
H0 : p̂1 = p̂2

The alternative hypothesis states that the two population proportions are
unequal (in this case, the rate of occurrence of a headache is more among the
Viagra in comparison to the placebo groups) : H0 : p̂1 > p̂2

The test statistic (denoted as z) for testing the difference between two
population proportions is

𝑛1
1
) + (𝑛 )]
2

## Construction of the confidence intervals for the difference of two population

proportions involves computing the difference between the two population
proportions plus or minus the Margin of Error.

The table value of the z-score for the 99% confidence level is 2.58

ztable = 2.58

[p (1−p )]
1 + [p2 (1−p2 )]
̂ ̂ ̂ ̂
Margin of Error = 𝑧 ∗ √ 1
𝑛1 𝑛2

[0.16(0.84)]
= 2.58 ∗ √
734
+ [0.04725
(0.96)]

The formula for the 99% confidence interval is (p̂1 - p̂2) ± Margin of Error

## Now, ztable = 2.58

The p-value is the chance (expressed in percentage terms) of being to the right
of the value of the test statistic (which was 7.6) which is 100% - 99% = 1% =
0.01
2.

This is a case for testing of the difference of means. Here, there are two groups
in the form of small independent samples: The filtered king size cigarettes and
the non-filtered king size cigarettes . Assume that these small independent
samples have been drawn from normal populations, with means µx (population
mean for filtered cigarettes) and µy (population mean for non-filtered cigarettes)
Let the filtered cigarettes be the first group and the non-filtered cigarettes group
be the second group. Hence, n1 = n2 =6

## Sample mean for the first group = x̅ = (2+2+1+1+2+2)/6 = 1.67

Sample mean for the first group = ȳ = (1+1+2+1+1+1)/ 6 = 1.167

## Standard deviation for first group = s1 = 0.5164

Standard deviation for second group = s2 = 0.40
Let µx = population mean for filtered cigarettes

## µy = population mean for non-filtered cigarettes

The null hypothesis H0 states that the small independent samples have been
drawn from normal populations, with same means, that is µx = µy and that the
population variances are equal (σX2 = σy2). The alternative hypothesis H1 states that the
population means are not equal, that is µx ≠µy. The formula for the test statistic t is based
on the equal population variances assumption.

Before computing the test statistic, we need to test whether the two
independent samples have been drawn from normal populations with
the same variance σ2 . Under the null hypothesis, the population
variances are equal - σX2 = σy2 = σ2.The alternative hypothesis is that the
population variances are unequal -> σX2 ≠ σy2
The calculated F statistic is given by: F = sx2 / sy2

## F = (0.5164 * 0.5164) / (0.4 * 0.4) = 1.67

Where sx2 and sy2 are unbiased estimates of the common population variance σ2

The F statistic follows the F-distribution with [(n1 – 1), (n2 – 1)] degrees
of freedom = [5,5] degrees of freedom. The level of significance is α/2 = 0.05/2
= 0.025

The critical F value from the table, for α/2 = 0.025 and (5,5) degrees of freedom
is 7.15.

The calculated value is less than the critical table value (1.67 < 7.15). So, we
can conclude that the population variances are equal.
The formula for the test statistic is:

1 1
t = (x̅ - ȳ) / S√𝑛 + 𝑛
1 2

## S = the square root of the unbiased estimate of the common

population variance σ2

S= √ = 0.47
𝑛1 + 𝑛2 −2