Download presentation
Presentation is loading. Please wait.
Published byGeraldine Hudson Modified over 8 years ago
1
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric »two-sided, one-sided »t-test, rank-sum test, others… 2. establish the null and alternate hypothesis »null hypothesis, H 0, is what is assumed true until the data indicate that it is likely to be false »alternative hypothesis, H a, that we will accept if we decide to reject the null hypothesis 3. decide on an acceptable error rate is probability of making a Type I error 4. compute the test statistic from the data 5. compute the p-value »p is the believability of the data, 6. reject the null hypothesis of p <=
2
u types of errors
3
u example: –soil samples = 115, 125, 110, 95, 105 pcf –100 pcf specified –within specifications? »H 0 : H a : »Type I error: choose = 0.05 (95% confidence) »Type II error: = ?
4
–Type of test on mean: »test statistic: z or t »one-tail? Upper or lower? Upper: reject if z > z (or t) Lower: reject if z < -z (or t) »two-tail? Reject if z z (or t) –i.e., if |t| > t /2
5
–two-sided t-test on mean »H 0 : = 0 ( - o ) = 0 H a : # 0 »if t >= t critical, (p <= ) then reject H o with 100(1- )% confidence »if t < t critical, then do not reject H o. No basis to believe that the mean is different (not significantly different).
6
–Calculations »mean = 110, s = 11.2 »Test statistic: t t = |110-100|/(11.2/2.24) = 2.000 u t(0.05, 4) = 2.776 u t < t crit, do not reject H 0, not out of spec »p = 0.116 p > , do not reject H 0, not out of spec if we chose = 0.116, then t = t crit
7
u Notes on hypothesis test –Hypothesis test about a population variance –two-tailed or one-tailed »one-tail: prior information or direction –choosing »choose lower when have more data »cannot change after the fact »report p –p »higher p means more significance to the data »observed significance level »not either / or »forget and let the reader judge? –Power of test » , prob of type II error, depends on true value of parameter (unknown) »Power of test = 1 – u Power is probability of rejecting null hypothesis H 0, when alternative hypothesis is true (making correct decision to reject H 0 ) –Report all results, not just significant results –careful with outliers
8
u Two-sample hypothesis tests –(one sample: e.g., does = some number?) –( 1 - 2 ) : difference in means – d : mean difference; paired comparison of means –( 1 - 2 ) : difference in proportions – s 2 1 / s 2 2 : ratio of variances
9
u Two-sample z test (large-sample) p.482 –independent random samples
10
u Two-sample z test example –example 9.4 »H 0 : no difference in means »H a : 1 - 2 < 0 (one-tail) » = 0.05 z crit = -1.645 »1: mean = 78.67, variance = 59.08, n = 100 2: mean = 102.87, variance = 69.33, n = 55 »z = -2.19 < z crit REJECT H 0 (mean 1 < mean 2) »p = P(z < -2.19) = 0.0143
11
u Two-sample t test (small-sample) p.485 –assuming equal variances
12
u Matched pairs t test p.496 –use paired data to test for difference in mean –actually, test if mean difference is zero
13
u Comparing population variances –use ratio of variances –F = larger/smaller (for convenience) –F distribution »note on distributions variance fits a chi-square distribution: 2 distribution is non-negative distribution that includes degrees of freedom – 2 distribution is a type of gamma distribution u F distribution is the distribution of the ratio of two independent chi-square random variables.
14
u Two-sample t test (small-sample) –assuming unequal variances
15
u Contingency Tables –Does one variable depend on the other? –Is the cell count equal to that expected??? –Problem 9.58 »H 0 : hotspot type and rare species type are independent H a : they’re dependent »expected butterfly-but = 68*42/105 2 test < 2 =0.10 Do not reject H 0 : independent
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.