Testing Statistical Hypotheses
Total Page:16
File Type:pdf, Size:1020Kb
TESTING STATISTICAL HYPOTHESES David M. Lane. et al. Introduction to Statistics : pp. 370-447 ioc.pdf [email protected] ICY0006: Lecture 9 1 / 28 Contents 1 Basic Concepts in Testing ioc.pdf [email protected] ICY0006: Lecture 9 2 / 28 Next section 1 Basic Concepts in Testing ioc.pdf [email protected] ICY0006: Lecture 9 3 / 28 Statistical Hypotheses Any claim made about one or more populations of interest constitutes a statistical hypothesis. These hypotheses usually involve population parameters, the nature of the population, the relation between the populations, and so on. For example, we may hypothesize that: The mean of a population, m, is 2, or Two populations have the same variance, or A population is normally distributed, or The means in four populations are the same, or Two populations are independent, and so on. Procedures leading to either the acceptance or rejection of statistical hypotheses are called statistical tests. There are two approaches to accept or reject hypothesis: I Bayesian approach, which assigns probabilities to hypotheses directly (see our lecture Probability) I the frequentist (classical) approach (see below) ioc.pdf [email protected] ICY0006: Lecture 9 4 / 28 Statistical Hypotheses Any claim made about one or more populations of interest constitutes a statistical hypothesis. These hypotheses usually involve population parameters, the nature of the population, the relation between the populations, and so on. For example, we may hypothesize that: The mean of a population, m, is 2, or Two populations have the same variance, or A population is normally distributed, or The means in four populations are the same, or Two populations are independent, and so on. Procedures leading to either the acceptance or rejection of statistical hypotheses are called statistical tests. There are two approaches to accept or reject hypothesis: I Bayesian approach, which assigns probabilities to hypotheses directly (see our lecture Probability) I the frequentist (classical) approach (see below) ioc.pdf [email protected] ICY0006: Lecture 9 4 / 28 Statistical Hypotheses Any claim made about one or more populations of interest constitutes a statistical hypothesis. These hypotheses usually involve population parameters, the nature of the population, the relation between the populations, and so on. For example, we may hypothesize that: The mean of a population, m, is 2, or Two populations have the same variance, or A population is normally distributed, or The means in four populations are the same, or Two populations are independent, and so on. Procedures leading to either the acceptance or rejection of statistical hypotheses are called statistical tests. There are two approaches to accept or reject hypothesis: I Bayesian approach, which assigns probabilities to hypotheses directly (see our lecture Probability) I the frequentist (classical) approach (see below) ioc.pdf [email protected] ICY0006: Lecture 9 4 / 28 Hypothesis Testing Steps 1 State the hypotheses (the null hypothesis and an alternative hypothesis) 2 Formulate an analysis plan (e.g. the signicance level is 0.05, the test method one-sample z-test) 3 Analyse sample data 4 Interpret result ioc.pdf [email protected] ICY0006: Lecture 9 5 / 28 Hypothesis Null Hypothesis (denoted H0): is the statement being tested in a test of hypothesis. Alternative Hypothesis (H1): is what is believe to be true if the null hypothesis is false. Null Hypothesis: H0 Must contain condition of equality =, >,or 6 Test the Null Hypothesis directly: reject H0 or fail to reject H0 Alternative Hypothesis: H1 Must be true if H0 is false, correspondingly 6=, <,or > `opposite' of Null Hypothesis ioc.pdf [email protected] ICY0006: Lecture 9 6 / 28 Hypothesis Null Hypothesis (denoted H0): is the statement being tested in a test of hypothesis. Alternative Hypothesis (H1): is what is believe to be true if the null hypothesis is false. Null Hypothesis: H0 Must contain condition of equality =, >,or 6 Test the Null Hypothesis directly: reject H0 or fail to reject H0 Alternative Hypothesis: H1 Must be true if H0 is false, correspondingly 6=, <,or > `opposite' of Null Hypothesis ioc.pdf [email protected] ICY0006: Lecture 9 6 / 28 Hypothesis Null Hypothesis (denoted H0): is the statement being tested in a test of hypothesis. Alternative Hypothesis (H1): is what is believe to be true if the null hypothesis is false. Null Hypothesis: H0 Must contain condition of equality =, >,or 6 Test the Null Hypothesis directly: reject H0 or fail to reject H0 Alternative Hypothesis: H1 Must be true if H0 is false, correspondingly 6=, <,or > `opposite' of Null Hypothesis ioc.pdf [email protected] ICY0006: Lecture 9 6 / 28 Stating the hypothesis If you wish to support your claim, the claim must be stated so that it becomes the alternative hypothesis. H0 must always contain equality; however some claims are not stated using equality. Therefore sometimes the claim and H0 will not be the same. Ideally all claims should be stated that they are Null Hypothesis Example The problem: In the 1970s, 2029 year old men in the U.S. had a mean m body weight of 77 kg. Standard deviation s was 19 kg. We test whether mean body weight in the population now diers. Null hypothesis H0 : m = 77 (no dierence) Alternative hypothesis can be either H1 : m > 77 (one-sided test) or H1 : m 6= 77 (two-sided test) ioc.pdf [email protected] ICY0006: Lecture 9 7 / 28 Formulation of an analysis plan. The analysis plan describes how to use sample data to evaluate the null hypothesis. The evaluation often focuses around a single test statistic. The analysis plan should specify the following elements. Signicance level. Often, researchers choose signicance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used. Test method. Use the one-sample t-test to determine whether the hypothesized mean diers signicantly from the observed sample mean. Alternative options are: I the one-sample z-test I the two-sample t-test I the two-sample z-test I etc. ioc.pdf [email protected] ICY0006: Lecture 9 8 / 28 Analyse sample data: Test Statistic Find the value of the test statistic (mean score, proportion, t statistic, z-score, etc.) described in the analysis plan. One-sample test of a mean when s is known p Take a sample of the size with the mean and a standard error x n m0 sx = s= n Compute z-statistic for the m0 ≡ population mean assuming H0 is true: m − m0 z = x sx Example: Body Weight m0 = 77 and s = 19. Let's take a SRS of size n = 64. ioc.pdf [email protected] ICY0006: Lecture 9 9 / 28 Analyse sample data: Test Statistic Find the value of the test statistic (mean score, proportion, t statistic, z-score, etc.) described in the analysis plan. One-sample test of a mean when s is known p Take a sample of the size with the mean and a standard error x n m0 sx = s= n Compute z-statistic for the m0 ≡ population mean assuming H0 is true: m − m0 z = x sx Example: Body Weight m0 = 77 and s = 19. Let's take a SRS of size n = 64. If we nd a sample mean 79, then we have mx = s 19 s = p = p = 2:375 x n 64 m − m0 79 − 77 z = x = = 0:842 2 375 ioc.pdf sx : [email protected] ICY0006: Lecture 9 9 / 28 Analyse sample data: Test Statistic Find the value of the test statistic (mean score, proportion, t statistic, z-score, etc.) described in the analysis plan. One-sample test of a mean when s is known p Take a sample of the size with the mean and a standard error x n m0 sx = s= n Compute z-statistic for the m0 ≡ population mean assuming H0 is true: m − m0 z = x sx Example: Body Weight m0 = 77 and s = 19. Let's take a SRS of size n = 64. If we nd a sample mean 83, then we have mx = m − m0 83 − 77 x 2 652 z = = 2 375 = : sx : ioc.pdf [email protected] ICY0006: Lecture 9 9 / 28 Sampling distribution Distribution of all the x's x1 = 799 > > > > x2 = 83> => > > x3 = 75> > . > . > . ; Kilograms Population mean m0 = 77 kg Sampling distribution of x under H0 : m = 77 for n = 64 ) x ∼ N (77;2:375) ioc.pdf [email protected] ICY0006: Lecture 9 10 / 28 Decision Errors Two types of errors can result from a hypothesis test. Type I error occurs when the researcher rejects a null hypothesis when it is true. The probability of committing a Type I error is called the signicance level. This probability is also called alpha, and is often denoted by a. Type II error occurs when the researcher fails to reject a null hypothesis that is false. The probability of committing a Type II error is called Beta, and is often denoted by b. The probability of not committing a Type II error is called the Power of the test. ioc.pdf [email protected] ICY0006: Lecture 9 11 / 28 The Table Summarizing Type I and Type II Errors a = P(H1jH0) b = P(H0jH1) ioc.pdf [email protected] ICY0006: Lecture 9 12 / 28 Decision Rules The analysis plan includes decision rules for rejecting the null hypothesis. In practice, statisticians describe these decision rules in two ways with reference to a P-value or with reference to a region of acceptance. A. P-value. The strength of evidence in support of a null hypothesis is measured by the P-value.