Statistical Inference Classical and Bayesian Methods Class 6 AMS-UCSC Thu 26, 2012 Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 1 / 15
Topics Topics We will talk about... 1 Hypothesis testing Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 2 / 15
The Null and Alternative Hypotheses Definitions Example: Rain from Seeded Clouds In this problem we were interested in whether or not the average log-rainfall from seeded clouds (µ) was greater than 4, which is the average log-rainfall from non seeded clouds. In terms of the parameter vector θ = (µ, σ 2 ), we want to check whether θ lies in the set {(µ, σ 2 ) : µ > 4}. Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 3 / 15
The Null and Alternative Hypotheses Hypothesis testing The Statistical Problem Let Ω be the parameter space. Suppose Ω can be partitioned in two disjoint subsets Ω 0 and Ω 1 such that Ω = Ω 0 Ω 1. Denote H 0 the hypothesis that θ Ω 0 and H 1 the hypothesis that θ Ω 1. A problem of this type in which a decision has to be made is a hypothesis testing problem. A procedure to decide which hypothesis to choose is a test procedure. Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 4 / 15
The Null and Alternative Hypotheses Hypothesis testing Some definitions Null and Alternative Hypotheses The hypothesis H 0 is the null hypothesis and the hypothesis H 1 is the alternative hypothesis. If after performing the test we decide that θ lies in Ω 1 we are said to reject H 0. If θ lies in Ω 0 we are said not to reject H 0 Suppose we want to test the following hypothesis: H 0 : θ Ω 0 H 1 : θ Ω 1 Simple and Composite Hypotheses If Ω i contains just a single value of θ then H i is a simple hypothesis. If Ω i contains more than one value of θ then H i is a composite hypothesis Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 5 / 15
The Null and Alternative Hypotheses Hypothesis testing Some definitions (Cont.) One-sided and Two-sided Hypothesis Let θ be a one-dimensional parameter. One sided null hypothesis are of the form: H 0 : θ θ 0 or θ θ 0 ; which corresponds to the one-sided alternative hypothesis being H 1 : θ > θ 0 or θ < θ 0. When the null hypothesis is simple (H 0 : θ = θ 0 ) the alternative hypothesis is usually two-sided (H 1 : θ θ 0 ) Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 6 / 15
Critical Region and Test Statistics Example Mean of a Normal distribution with known variance Let X = (X 1, X 2,..., X n ) a random sample from a normal distribution with unknown mean µ and known variance σ 2. We want to test the hypothesis: H 0 : µ = µ 0 H 1 : µ µ 0 One would reject H 0 if X n is far from µ 0. In a problem of this type, the statistician might specify a test procedure by partitioning the sampling space S into two subsets: S 1 contains all the values of X for which we will reject H 0, and S 0 contains all the values of X for which we will not reject H 0. For example if x = (x 1, x 2,..., x n ) is the set of all data vectors in the sample space, S can be divided into: S 0 = {x : c X n µ 0 c}, and S 1 = S C 0. We reject H 0 if X S 1. We do not reject H 0 if X S 0. Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 7 / 15
Critical Region and Test Statistics Critical Region and Test Statistic Mean of a Normal distribution with known variance Critical Region The set S 1 where we reject H 0 is the critical region of the test. The test procedure is determined by specifying the critical region Note: Please note that divisions in the parameter space Ω are related but are not equal to divisions in the sampling space S. Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 8 / 15
Critical Region and Test Statistics Critical Region and Test Statistic Mean of a Normal distribution with known variance (Cont.) In most problems for hypothesis testing the critical region is specified in terms of a statistic T = r(x) Test Statistic Let X a random sample from a distribution that depends on parameter θ. Let T = r(x) be a statistic and R a subset of the real line. Suppose a test procedure such that we reject H 0 if T R. Then we call T a test statistic and R a rejection region In the example of the mean of the Normal distribution with known variance the statistic is T = X n µ 0 and the rejection interval is [c, ). Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 9 / 15
Power function and types of errors Power function Definition Suppose that δ is a test procedure either based on a critical region or based on a test statistic. We can calculate for each value of θ the probability π(θ δ) that the test will reject H 0 and the probability 1 π(θ δ) that the test will not reject H 0. This function is the power function of the test. Power function Let δ be a test statistic. The function π(θ δ) is the power function of the test δ. If δ is described in terms of a critical region S 1 the power function is defined as π(θ δ) = Pr{X S 1 θ} for θ Ω. If δ is described in terms of a test statistic T and a rejection region R the power function is defined as π(θ δ) = Pr{T R θ} for θ Ω Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 10 / 15
Power function and types of errors Power function Example: Mean of a Normal distribution with known variance In the above example about the normal distribution with mean µ unknown and variance known, we want to find the power function for the test δ based on the test statistic X n µ 0 and the critical region R = [c, ). We use the fact that the distribution of X n is Normal with mean µ and variance σ 2 /n. We find the power function from this distribution: Pr(T R µ) = Pr( X n µ 0 + c µ) + Pr( X n µ 0 c µ) = 1 Φ(n 1/2 µ 0 + c µ ) + Φ(n 1/2 µ 0 c µ ) σ σ This final expression is the power function π(δ µ). Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 11 / 15
Power function and types of errors Power function Example: Mean of a Normal distribution with known variance (Cont.) The following graph is an example of the power function for three different test with c = 1, 2, 3 and specific values µ 0 = 4, n = 15, σ 2 = 9 Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 12 / 15
Power function and types of errors Power function Types of Errors In every test we can make errors. If θ Ω 0 and we reject H 0 we make an incorrect decision. If θ Ω 1 and we do not reject H 0 is also an incorrect decision. This suggests two types of errors: Type I/II errors The rejection of a true null hypotheses is a type I error or an error of the first kind. The decision not to reject a false null hypothesis is a type II error or an error of the second kind In terms of the power function: If θ Ω 0 π(δ θ) is the probability of Type I error If θ Ω 1 1-π(δ θ) is the probability of Type II error Since θ Ω 0 or θ Ω 1, only one type of error is possible. Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 13 / 15
Power function Types of Errors Hypothesis testing Power function and types of errors Normally Null and Alternative Hypothesis are chosen so that type I error is the most to be avoided. If we have one-sided hypothesis, the equal sign is normally included in the null hypothesis Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 14 / 15
Power function and types of errors Thanks for your attention... Winter 2012. Session 1 (Class 6) AMS-132/206 Thu 26, 2012 15 / 15