Introduction to Probability and Statistics Chater 8 Ammar M. Sarhan, asarhan@mathstat.dal.ca Deartment of Mathematics and Statistics, Dalhousie University Fall Semester 28
Chater 8 Tests of Hyotheses Based on a Single Samle Dr. Ammar Sarhan 2
8.1 Hyotheses and Test Procedures Hyotheses The null hyothesis, denoted H, is the claim that is initially assumed to be true. The alternative hyothesis, denoted by H a, is the assertion that is contrary to H. Possible conclusions from hyothesis testing analysis are reject H or fail to reject H. Examles H : =.75 against H a :.75 H : =.75 against H a : <.75 H : =.75 against H a : >.75 Dr. Ammar Sarhan 3
A Test of Hyotheses A test of hyotheses is a method for using samle data to decide whether the null hyothesis should be rejected. An examle will be given in the class. Dr. Ammar Sarhan 4
Test Procedure A test rocedure is secified by 1. A test statistic, a function of the samle data on which the decision is to be based. 2. A rejection region, the set of all test statistic values for which H will be rejected (null hyothesis rejected iff the test statistic value falls in this region.) An examle will be rovided in the class. Dr. Ammar Sarhan 5
Errors in Hyothesis Testing Tye I error A tye I error consists of rejecting the null hyothesis H when it was true. The robability of this error is denoted by α. α = P(tye I error) = P(H is rejected when it is true) Tye II error A tye II error involves not rejecting H when H is false. The robability of this error is denoted by β. β = P(tye II error) = P(H is not rejected when it is false) Dr. Ammar Sarhan 6
Proosition Rejection Region: α and β Suose an exeriment and a samle size are fixed, and a test statistic is chosen. The decreasing the size of the rejection region to obtain a smaller value of α results in a larger value of β for any articular arameter value consistent with H a. This roosition says that once the test statistic and n are fixed, there is no rejection region that will simultaneously make both α and all β s small. A region must be chosen to effect a comromise between α and β. Dr. Ammar Sarhan 7
Significance Level Secify the largest value of α that can be tolerated and find a rejection region having that value of α. This makes β as small as ossible subject to the bound on α. The resulting value of α is referred to as the significance level. Traditional levels of significance are.1,.5, and.1. Level α Test A test corresonding to the significance level α is called a level α test. A test with significance level α is one for which the tye I error robability is controlled at the secified level. Examles: a level.1 test, or a level.5 test, or a level.1 test. Dr. Ammar Sarhan 8
8.2 Tests About a Poulation Mean Case I: A Normal Poulation With Known σ Null hyothesis: H : = Test statistic value: z x / n Alternative hyothesis H a : > H a : < H a : Rejection Region for Level α Test z z α (uer-tailed test) z - z α (lower-tailed test) either z z α/2 or z - z α/2 (two-tailed test) Dr. Ammar Sarhan 9
Recommended Stes in Hyothesis-Testing Analysis 1. Identify the arameter of interest and describe it in the context of the roblem situation. 2. Determine the null value and state the null hyothesis. 3. State the alternative hyothesis. 4. Give the formula for the comuted value of the test statistic. 5. State the rejection region for the selected significance level. 6. Comute any necessary samle quantities, substitute into the formula for the test statistic value, and comute that value. 7. Decide whether H should be rejected and state this conclusion in the roblem context. The formulation of hyotheses (stes 2 and 3) should be done before examining the data. Dr. Ammar Sarhan 1
Dr. Ammar Sarhan 11 Tye II Probability β(`) for a Level α Test Alternative hyothesis β(`) for Level α Test H a : > H a : < H a : n z / n z / 1 n z n z / / 2 / 2 /
Samle Size The samle size n for which a level α test also has β(`) at the same alternative value ` is n ( z z ' ( z / 2 z ' 2 ) ) 2 for a one tailed (uerorlower) test for a two tailed test (an aroximatesolution) H a : > H a : < H a : Examle 8.7,. 298. Dr. Ammar Sarhan 12
Case II: Large-Samle Tests When the samle size is large, the z tests for case I are modified to yield valid test rocedures without requiring either a normal oulation distribution or a known σ. For large n, s is close to σ. Large Samle Tests (n > 4) Test Statistic: Z X S ~. / n N a,1 The use of rejection regions for case I results in a test rocedure for which the significance level is aroximately α. Examle 8.8,. 299. Dr. Ammar Sarhan 13
Case III: A Normal Poulation Distribution If X 1,,X n is a random samle from a normal distribution, the standardized variable T X S / n ~ tn 1 The One-Samle t Test Null hyothesis: H : = Test statistic value: t x s / n Dr. Ammar Sarhan 14
The One-Samle t Test Alternative hyothesis H a : > Rejection Region for Level α Test t t α, n-1 (uer-tailed test) H a : < t - t α, n-1 (lower-tailed test) H a : either t t α/2, n-1 or t - t α/2, n-1 (two-tailed test) Examle 8.9,. 31. Dr. Ammar Sarhan 15
8.3 Tests Concerning a Poulation Proortion A Poulation Proortion Let denote the roortion of individuals or objects in a oulation who ossess a secified roerty. Large-Samle Tests Large-samle tests concerning are a secial case of the more general large-samle rocedures for a arameter θ. If n 1 and n(1- ) 1, then Z ˆ ~ a. N (1 ) / n,1 ˆ X n Dr. Ammar Sarhan 16
Large-Samles Concerning Null hyothesis: H : = Test statistic value: z ˆ (1 ) / n Alternative hyothesis H a : > H a : < H a : Rejection Region for Level α Test z z α (uer-tailed test) z - z α (lower-tailed test) either z z α/2 or z - z α/2 (two-tailed test) Examle 8.11,. 37. Dr. Ammar Sarhan 17
General Exressions for β(`) for a Level α Test Alternative hyothesis β(`) for a Level α Test H a : > z ( 1 ) / n (1 ) / n H a : < 1 z (1 (1 ) / n ) / n H a : z ( 1 ) / n (1 ) / n z / 2 ( 1 ) / n (1 ) / n / 2 Dr. Ammar Sarhan 18
Dr. Ammar Sarhan 19 Samle Size The samle size n for which a level α test also satisfies β(`)= β is (an aroximatesolution) tailed test for a two ) (1 ) (1 tailed test for a one ) (1 ) (1 2 2 / 2 z z z z n Examle 8.12,. 38.
Small-Samle Tests Test rocedures when the samle size n is small are based directly on the binomial distribution rather than the normal aroximation Consider the alternative H a : >, and let X be the number of successes in the samle. Then X is the test statistic, and the uer-tailed rejection region has the form x c. When H is true, X ~ Bin(n, ), so α = P(tye I error) = P(H is rejected when it is true) = P(X c when X ~ Bin(n, ) ) = 1- B(c-1; n, ) Dr. Ammar Sarhan 2
β(`) = P(tye II error) = P(H is not rejected when it is false) = P(X < c when X ~ Bin(n, `) ) = B(c-1; n, `) Samle Size The samle size n necessary to ensure that a level α test also satisfies β(`)= β must be determined by trial and error using the binomial cdf. Dr. Ammar Sarhan 21
Test rocedures for H a : <, and for H a :, are constructed in a similar manner. For H a : <, the R.R. is x c and c is the largest number satisfying B(c; n, ) α. For H a :, the R.R. consists of both large and small x values. Examle 8.13,. 39. Dr. Ammar Sarhan 22
8.4 P-values The P-value (or observed significance level) is the smallest level of significance at which H would be rejected when a secified test rocedure is used on a given data set. Once the P-value has been determined, the conclusion at any articular level α results from comaring the P-value to α. 1. If P-value α, then reject H at level α. 2. If P-value > α, then do not reject H at level α.. Examle 8.16,. 313. Dr. Ammar Sarhan 23
The P-values The P-value is the robability, calculated assuming H is true, of obtaining a test statistic value at least as contradictory to H as the value that actually resulted. The smaller the P-value, the more contradictory is the data to H. Dr. Ammar Sarhan 24
P-values for z Test P-value: P 1 ( z) ( z) 21 ( z ) uer tailed test lower tailed test two tailed test where z is the value of the test statistic value. Examle 8.17,. 315. Dr. Ammar Sarhan 25