Statistical Tests Statistical Testing vs CIs

If the investigator has no preconceived notion Situations often arise where an investigator is about the value of a population parameter she’ll interested in estimating whether: use a CI developed from the data to help 1) A population parameter has changed since it was her estimate it last examined In testing, the investigator uses the null 2) Two populations have differences with respect to hypothesis as a possible value. She will only a specified parameter. reject this value if the sample data provide 3) A population parameter fits into some region of overwhelming evidence against the value interest

Testing # 1 Testing # 2

Statistical Tests Example 1 Statistical Tests Example 2

• A friend of mine has been studying free radical formation • Back in the late 60’s and early 70’s the sport fishing and its effect on the incidence of heart disease and industry in NY state was concerned about the growing diabetes. As part of her dissertation she compared the number of lake trout that had elevated levels of mercury blood concentrations of a compound called (Hg) and cadmium (Cd). In fact the NY department of malonyldialdehyde (MDA) in a population of black s wildlife issued a strong warning regarding the • Seventh Day Adventists and the general population. The consumption of lake trout over a certain size. Since that study question was: “Do black Seventh Day Adventists time many changes have taken place and wildlife have lower levels of MDA than the rest of the population department personnel would like to test whether the levels and; is this correlated to lower incidences of heart disease of Cd and Hg in lake trout have decreased on average. and diabetes? “

Testing # 3 Testing # 4 Statistical Tests Example 3 Statistical Tests

• A statistical test is often called a test of significance • A student production group is willing to put forth the because the result provides evidence to conclude whether effort and resources to bring a well known music group to or not a population parameter has changed significantly . campus if it can be reasonably sure that more than 25% of • The result of a statistical test may also provide evidence to the student body would support the performance. conclude whether or not two populations differ significantly .

Testing # 5 Testing # 6

Statistical Tests Statistical Tests • Look at example 3: The student group would like to • Statistical tests are also known as hypothesis tests. determine if support for booking a music group is more • The investigator has a belief regarding the value of some than 25%. Let’s say that they randomly survey a SRS of population parameter and the result of a hypothesis leads 200 students and 60 students say that they would support to a conclusion about this belief. this function. Can we conclude that more than 25% are in • Another aspect of these tests is that, in all cases, we set up favor of booking the band? a null hypothesis and an .

Testing # 7 Testing # 8 Hypothesis Test Process Step 1 Characteristics of the Ho/Ha pair

• The first step in any hypothesis testing procedure 1) Ho and Ha account for all possible values of the is to set up the null hypothesis (Ho ) and the population parameter of interest alternate hypothesis (Ha ). 2) Ho and Ha are mutually exclusive • Ho: p < 0.25 • Ha: p > 0.25 3) Ho contains the “ = ” statement

Testing # 9 Testing # 10

Setting up Hypotheses Statistical Tests Setting 1 • This is the “heavy metal” example. Let’s say that, on • One of the most important steps in this testing average, lake trout contained about 15 ppm heavy metals realm is the correct construction of the null and in the late 60s. Set up the null and alternate hypothesis alternate hypothesis. for testing whether this level has decreased . • In the next few slides we look at some of the • Ho: µ > 15 techniques used to get this step right. • Ha: µ < 15

• Is this a 1 tail or 2 tailed test? Why?

Testing # 11 Testing # 12 Statistical Tests Setting 2 Statistical Tests Setting 3 • A scientist would like to test whether the • A production engineer is interested in determining whether the proportion of defective parts produced by the average biomass per acre in an area in eastern night shift is more than 12%. Set up the null and Colorado is different than 81.5 kg alternate hypotheses. • Ho: µ = 81.5 • Ho: p < 0.12 • Ha: µ ≠ 81.5 • Ha: p > 0.12 • This is an example of a two tailed test. Key word is different . • 1 tailed test. Key phrase “is more than 12%”

Testing # 13 Testing # 14

Hypothesis Test Process Step 2A Hypothesis Test Process Step 2B

• Select a significance level for your test. • Determine if you’re test is one tailed or two tailed. • The significance level is called alpha (ααα). It is the • Based on the type of test – Pick out the critical chance you’re willing to take to arrive at the value from a table wrong conclusion. • The level of the test must be specified in advance. • Often significance levels are 0.01, 0.02, 0.025, 0.05

Testing # 15 Testing # 16 Hypothesis Test Process Step 3 Hypothesis Test Process Step 4

• Draw a decision curve and label it with the • Compute the test critical value along with the rejection region • This statistic is the evidence that the sample provides against the Ho

Testing # 17 Testing # 18

Hypothesis Test Process Step 5 ………………Step 6 • Add the test statistic to your decision graphic

• Make a statistical decision • You only have 1 of 2 choices Reject Ho Fail to Reject Ho

Testing # 19 Testing # 20 ………………Step 7 Statistical Tests

• Take an example : A student group would like to • The last step is to communicate a lucid, plain determine if support for booking a music group is more language interpretation of the hypothesis test than 25%. Let’s say that they randomly survey a SRS of results. 200 students and 60 students say that they would support • It’s not informative to anyone except the study this function. Can we conclude that more than 25% are in investigators if the only conclusion is that you favor of booking the band? “Reject Ho”!

Testing # 21 Testing # 22

Hypothesis Test Process Step 1 Hypothesis Test Process Step 2A

• The first step in any hypothesis testing procedure • Select a significance level for your test. is to set up the null hypothesis (Ho) and the • The significance level is called alpha (ααα). It is the alternate hypothesis (Ha) . chance you’re willing to take to arrive at the • Ho: p < 0.25 wrong conclusion. • Ha: p > 0.25 • The level of the test must be specified in advance. • Let’s use the 0.05 level of significance for this test. Note that the claim you’d like to test goes in the Ha statement

Testing # 23 Testing # 24 Hypothesis Test Process Step 2B Hypothesis Test Process Step 3

• Once the significance level is chosen we • Draw a decision curve and label it with the look up a critical value critical value along with the rejection region • When doing hypothesis tests for proportions the critical value will be a z value

• In this example z crit = 1.65

Testing # 25 Testing # 26

Hypothesis Test Process Step 4 Hypothesis Test Process Step 4

60 • Compute the test statistic • In this example, pˆ = = 30.0 200 − pˆ p0 z = • p0 = 0.25, this is the hypothesized calc ()− p0 1 p0 population proportion n

Testing # 27 Testing # 28 Hypothesis Test Process Step 4 Hypothesis Test Process Step 5

• Compute the test statistic • Add the test statistic to your decision graphic 30.0 − 25.0 z = = 63.1 calc 25.0 1( − 25.0 ) 200

Testing # 29 Testing # 30

Hypothesis Test Process Step 6 Step 7: English Translation

• We might say that, At alpha = 0.05 there is not enough • Since the test statistic lies in the FTR region we evidence to conclude that the proportion of students fail to reject Ho favoring the concert is more than 0.25

Testing # 31 Testing # 32 Hypothesis Test: 2-tailed Step 1: Ho and Ha

• It’s been estimated that about 10% of the US population is left handed. A statistics professor was interested in investigating this claim in her own classes so she takes a SRS of 50 students and determines that 8 are left handed. • Ho: p = 0.10 Is there enough evidence to conclude that the proportion • Ha: p ≠ 0.10 of south-paws in her classes is different than that of the US? Use an alpha level of 0.02

Testing # 33 Testing # 34

Step 2: Alpha and z crit Hypothesis Test Process Step 3

• Draw a decision curve and label it with the Note that this is a two tailed test. This critical value along with the rejection region that we use the “Area in two tails” header row to find the critical z value.

± The z crit value is 2.33

Testing # 35 Testing # 36 Hypothesis Test Process Step 4 Computer Results for the Test

• Compute the test statistic

pˆ − p Test and Confidence Interval for One Proportion z = 0 calc ()− Test of p = 0.1 vs p not = 0.1 p0 1 p0 n Success = 1

Variable X N Sample p 98.0 % CI Z-Value P-Value • Or look it up in computer output LeftHand 8 50 0.1600 (0.039,0.282) 1.41 0.157

Testing # 37 Testing # 38

Hypothesis Test Process Step 5 Hypothesis Test Process Step 6

• Add the test statistic to your decision graphic • Since the test statistic lies in the FTR region we fail to reject Ho • This is the usual procedure

Testing # 39 Testing # 40 Step 7: English Translation …Step 6 the statistical decision: P-value

• At alpha = 0.02 there is not enough evidence to • One method used to make this decision is to look conclude that the proportion of left handed students in at the P-value this professor’s class is different than 0.10 • This is a measure of how closely your data fit your hypothesis.

Testing # 41 Testing # 42

P-Values in statistical analysis P-value Characteristics

• Since the p-value is a probability, it is a The P-value is the probability that you get number between 0 and 1. the sample results simply by chance and • Small p-values ( < 0.01) imply significant given that the null hypothesis is true. results  Small p-values support the alternative hypothesis Ha. • Large p-values (p > .10) support the null hypothesis Ho.

Testing # 43 Testing # 44 P-values and the alpha level Hypothesis Test Process Step 6

• The general rule for hypothesis testing is: If the p-value is less than the specified alpha Note that we might also use the P-value information level then you reject Ho. here to make the statistical decision • In this case the sample data favor the alternate • Since the P-value is 0.157 and alpha was 0.02, P > α hypothesis. so we fail to reject Ho • If the p-value is greater than the specified alpha • The English conclusion, of course, would be the level then Ho is not rejected. same.

Testing # 45 Testing # 46

P-Value Interpretation

If the proportion of left handed students in her class really is 10% then the chance that we get a sample proportion of 16% from a random sample of 50 is 15.7%

This is considered a “good” chance so it’s not strong evidence for rejecting Ho. What investigators look for is sample data that has a small probability of happening if Ho is true.

Testing # 47