You are on page 1of 6

Definitions: *SAS puts out 2-sided p-values

Rule/definitions Applications
Chebyshev’s Rule 75% of data lie within ybar ± 2s
(weaker than Empirical rule) 88.8% of data lie within ybar ± 3s
93.75 of data lie within ybar ± 4s
Empirical Rule (doesn’t work 68% of data lie within ybar ± s
for skewed distns) 95% of data lie within ybar ± 2s
99.7% of data lie within ybar ± 3s
Central Tendency Sample mean ybar, sample median md, sample mode m0,
Chapter 3, slides 18-19 trimmed mean
Finding normal percentiles Given μ and σ , find y such that P(Y<y)
*Find appropriate z value:
z = (Y – μ)/ σ
Central Limit Theorem If the population is non-normal, the distribution of ybar will
become close to normal as n gets large
mean Use if interested in average value, cumulative cost, or
cumulative exposure (whether distrn is skewed or not)
median Use if interested in a typical response (half above, half
below)
Hypothesis testing for μ ybar ± t α/2(s/√n)
using the C.I. If # in hypotheses is outside interval, reject/fail to reject H0
Confidence interval (95%) Allows you to be 95% sure that the mean/average #/etc of
your sample (ybar) is between the upper & lower C.I.
Type I error, α Error of rejecting H0 when H0 is true. (Ch 5, slides 19-20)
Type II error, ß Error of not rejecting H0 when H0 is false.
Power Probability of rejecting H0 when H0 is in fact false (1-ß)
Research hypothesis When hypothesis test is set up so that we want to prove Ha
p-value Probability, given H0 is true, of observing a value of the test
statistic more supportive, or as supportive, of Ha than the
observed value. It also is the area under the curve outside the
interval (-t, t) (for 2-sided tests)
One-sided test (Ch 5, slides e.g. H0 ≤ 12, Ha > 12.
24-26) The RR is only on side of supporting Ha; p-value takes area
only in direction that supports Ha.
** SAS gives 2-sided p-values; usually just divide by 2 for 1-
sided test, but if test statistic value is on opposite side of zero
relative to side that supports Ha, then 1 – (p-value/2)
Variance Deviation from the mean; also, the variance of a set of n
Page 87 text measurements (y1, y2, …yn) with mean ybar is the sum of the
squared deviations divided by n-1: Σi(y-ybar)2
(n-1)
Variance, s2 2
s represents the sample variance
σ2 σ2 represents the population variance
Power Probability of rejecting H0, given Ha is true.
Power for 2-sided t test is < power for 1-sided test because 1-
sided is able to concentrate power in only 1 direction
Robustness A test is robust if the observed rate of type I errors is close to
Ch 5, slide 35 the claimed rate (α), despite failure of the assumptions of the
procedure
Tests for Normality (SAS) QQ plot, histograms, resides vs. predicted value plots; 1.
Ch 5, slide 37 Wilks-Shapiro Test, 2. Kolmogorov-Smirnoff Test, 3.
Cramer-VonMises Test; 4. Anderson-Darling Test
**With these 4 tests, H0: the data are normal, therefore, you
hope NOT to reject the null hypothesis with these.
If p-values are large, you have NO evidence vs. normality.
According to Boardman, he rarely uses these tests; he also
finds histograms not very helpful. Use QQs etc.
Bootstrap t-interval for the Uses distribution of the sample data to estimate the correct
mean, Ch 5, slides 44-46 percentiles for a non-normal population (use modified t
interval for 95% CI formula below) – repeats many times
Pooled/unpooled If n1=n2 then pooled and unpooled are =
Folded p-value 2-sided p-value we get in SAS output with F distribution.
Ch 7, slide 20 Only valid when the data are NORMAL!
Formulas:
The mean of ybar is μ
Standard deviation of ybar σ/√n
Sample variance S2
Interquartile Range, IQR Q3-Q1
Sample mean ybar has μybar = μ
σybar = σ/√n
Point estimate with standard error (sample ybar ± s/√n
mean, ybar, is almost always used; if heavy tailed
symmetric distn, use medians or trimmed means)
Confidence Interval (gives estimate for μ and ybar ± 2(σ/√n) = a random interval that will
statement of confidence about whether μ is in the contain the true μ with probability approx 0.95.
interval) 2 is only approximate (from Empirical rule)
Confidence Interval (corrected for unknown σ) ybar ± tα/2(s/√n) (Ch 5, slide 14)
t, test statistic t = ybar-μ0/( s/√n)
Ch 5, slide 18 Assess whether computer t is within CI to reject/fail to
reject H0
Power calculations; finding n CI is 100(1-α)% CI
Ch 5, slides 28-29 N = [(tα/2, n-1)2 *s2]/E2
Substitute an estimate of σ for s, and use a prior guess
of n to get d.f. for tα/2
90% sure 95% CI will be no wider than 2E Half-width = E = ( tα/2)[(1.21*σ)/√n]
Ch 5, slide 30 (we will do this in SAS, see HW#3, 1B)
Bootstrap: 95% C.I. t interval ybar ± t0.025(s/√n)
Ch 5, slide 44
Bootstrap: 95% C.I. t interval, modified for ybar – t*0.025(s/√n), ybar + t*0.975(s/√n)
non-symmetric distributions (Ch 5, slide 44)
Two-sided T test Ch 6, slides 3-5 t = ybar1 – ybar2 – 0/std error of (ybar1-ybar2)
sp (pooled SD) = √(n1 – 1)s12 + (n2 – 1)s22/n1 + n2 – 2
Ch 6, slides 6-7 (the entire thing is squared)
t for 2-sided t test (hypothesis test) t = ybar1–ybar2/sp √1/n1 + 1/n2
Ch 6, slides 6-6 df = n1 + n2 - 2
CI for μ1 – μ2 ybar1 – ybar2 ± tα/2 * sp√1/n1 + 1/n2
Ch 6, slide 9
Modified t-test (Sattherwaite) t’ = ybar1 – ybar2/√ (s12/ n1 + s22/n2)
Ch 6, slide 11
Find n when expect CI (of μ1-μ2) width of n = 2(tα/2)2 sp2/E2
2E Where E = tα/2*sp√1/n1 + 1/n2
Ch 6, slides 18-19 Substitute an estimate of σ for sp and use an
**Remember, this is n per group** approx. value for tα/2
Find n to be 90% sure that 95% CI for μ1- SAS!
μ2 will be no wider than 2E Ch 6, slide 20
HW#3, 1B
Compute power for 2-sided t tests SAS!
Ch 6, slides 23-24
Reject if /t/ > tα/2
Non-centrality parameter λ = μ1-μ2/σ√2/n
Wilcoxon Rank Sum Test, Table 5b Sum ranks from groups; T1 = sum of ranks
for group 1; TU = obtained from Table 5b
Normal approximation for Wilcoxon Rank Test statistic = T1 – μT/σT
Sum Test Ch 6, slide 28 μT = n1(n1+n2+1)/2; σT = √n1n2(n1+n2 +1)/12
CALCULATED ONLY IN SAS (not by hand)
Paired sampling (paired t-test and CI) H0: μ0 = D0; Ha: μ0 ≠ D0
Ch 6, slides 33-34 t = dbar = D0/(sd/√n)
Reject if /t/ > tα/2, df = n-1
Paired-t CI for μ1-μ2 = μd dbar ± tα/2(sd/√n)
Ch 6, slide 34 **df is based on the n of # of pairs (NOT the #
of samples)
Wilcoxon Signed Rank Test T+ = sum of pos ranks; T- = sum of neg ranks.
Ch 6, slides 36-38 N = # of non-zero differences
*Table 6 H0: distn of differences is symm about zero.
Ha: differences tend to be larger than zero.
(Reject if T = T- ≤ Tα)
Ha: differences tend to be smaller than zero.
(Reject if T = T+ ≤ Tα)
Ha (2-sided): Reject if T = smaller of T- and
T+ is ≤ Tα
Chi-square test for σ (Table 7) Test statistic: χ2calc = (n-1)s2/σ02
Ch 7, slides 3-8 Reject H0 if χ2calc > χα2 (RIGHT-sided)
Reject H0 if χ2calc < χ2 1-α (LEFT-sided)
Reject H0 if χ2calc < χ2 1-α/2 or χ2calc > χα/22 (2-
sided)
Hypothesis test for σ H0: σ2 = σ02 versus Ha: σ2 > σ02
**Ch 7, slide 8** σ2 < σ0 2
σ2 ≠ σ0 2
Calculate test statistic
CI for σ Start w/probability statement about test stat,
Ch 7, slides 9-10 then manipulate inequalities so that the
parameter is in the middle.
√(n-1)s2/χ2 0.025 < σ < √(n-1)s2/χ2 0.975
*Sensitive to normal distribution
Error rates, slide 11
Compare 2 SDs or variances H0: σ1/σ2 ≤ 1
Ch 7, slides 12-end Ha: σ1/σ2 > 1 (RIGHT-sided alternative)
F distribution, Ch 7, slides 13-end F = (s12/σ12)/(s22/σ22)
Table 8 Has F distribution with df1 = dfn = n1-1, df2 =
dfd = n2-1 (n=numerator, d=denominator)
**If left alternative, can reverse labels on
groups so it’s a right alternative OR can
invert upper values (slides 16-17)
Also beware of ‘folded F p-values’ – for 2-
sided p’s, double the smaller of the 1-sided
p’s
CI for σ1/σ2 √(s12/ s22*FL) < σ1/σ2 < √(s12/ s22*FU)
Ch 7, slide 22 Where FL = 1/Fα/2,dfn,dfd
*Rule on inverting α/2 or df’s Dfn = n1 - 1, dfd = n2 - 1
And FU = 1/1-Fα/2,dfn,dfd = Fα/2,dfd,dfn
Levene’s test Ch 7, slide 24 zij = /yij - ybari/
Tests and Applications
Test Application
Normal t-interval (Ch 5) CI for the mean, distribution close to normal
Land’s interval (Ch 5) CI for the mean, lognormal distribution
Cox interval (Ch 5) CI for the mean, lognormal, large n (N>50)
Bootstrap-t (Ch 5) CI for the mean, don’t want to make assumptions about
(less than perfect) distribution, n is large enough that distribution shape estimate
pop distribution
2-sided AND 1-sided t T-test and CI, when you want to assess difference between
tests population means using sample means
Ch 6, slides 3-7, 8-10
Hypothesis test of 2- Assumes σ1 = σ2 = σ; estimate σ2 by a pooled estimate, sp2
sided t test (Ch 6, slides Can use sp2 to get a t value and compare table t and calculated t
3-7)
One-sided t test Want only to consider the research alternative that one group is
Ch 6, slides 8, also 15- more/less than the other. *Negative values of the test statistic
16 support the alternative
Modified t-test for σ1 ≠ When you do not assume that the variances are equal, but you
σ2 (Sattherwaite’s) want to get the test statistic to do a t-test. t=t’ when n1=n2
Ch 6, slides 11-12, 13-14
How sensitive is t-test to If sample sizes are nearly =, effect of un= variances is minimal. t
unequal variances is preferred to use unless s12 & s22 are very different (if so, use
Ch 6, slide 16 t’). If n’s are unequal, effect of un= variances on t-test are
serious Æ leads to error
Ch 6, slide 30 **Use over WRST when distn is normal
Wilcoxon Rank Sum Nonparametric alternative to 2-sample t test.
Test Ranks values and sums the ranks for each group.
Ch 6, slides 25-30 Assumes the 2 distributns are identical under H0, and identical
but with a shift under Ha.
An approximate test of means
**Use over t-test when symmetric distn with moderately heavy
Ch 6, slide 30 tails or esp. if heavy tails, *if N’s are very unequal
Paired t-test and CI Make a column for D=difference between each paired sample
Ch 6, slides 31-35 set and perform a one-sample t test on the differences & test
whether the mean difference is zero.
μ1 = μ2 only if μd = 0
Wilcoxon Signed Rank Non-parametric alternative to the paired t-test, for non-normal
Test data. Order differences by absolute value, assign ranks to
differences & sum the ranks by sign of differences (T+ is sum of
pos ranks; T- is sum of neg ranks)
Bootstrap 2-sample t- Find what percentiles of the t-statistic would be if true pop had
test same shape as the sample. Resample the data, as if it were a
Ch 6, slides 39-40 population. Simulates data to get a t* value.
Hypothesis test for σ : Studying σ for a single population
Chi-square test
CI for σ Assumes normal distribution, very affected by skewed distns
Ch 7, slide 10
Comparing 2 SDs or To compare 2 variables, and (assuming already know means)
variances want to know which gives more consistent results.
F distribution Similar to Chi-square, compares σ2s. Non-symmetrical.
Ch 7, slides 13-20 Assumes normality (if non-normal, use Levene’s)
Levene’s test for Compute absolute values of the deviations from the sample
inequality of variances means, do a t-test to compare the mean absolute deviations
Ch 7, slide 24 between groups
*use when data are NOT normal

Situations Æ Tests

ƒ To compare means/distribution/CI for 1 or 2 samples: Student’s t test

ƒ To compare 2 means: CI, hypothesis testing, t-test

ƒ Non-parametric, non-normal or not recognized distribution, paired data: Wilcoxon Rank Sum Test

ƒ Non-parametric, not sure of distribution, heavy tails: Bootstrap

ƒ Compare 1-sample standard dev ( σ ) or variance: Chi-squared test (test statistic: (n-1)s2/ σ 0
2

ƒ Compare variance or σ (ratio), 2 samples: F-test (test statistic: s12/ s22 (assumes normality)

ƒ Non-parametric alternative to 2 sample t-test (can be non-normal): Wilcoxon Rank Sum Test

You might also like