Lesson 15 - 2 Runs Test for Randomness. Objectives Perform a runs test for randomness Runs tests are used to test whether it is reasonable to conclude.

Slides:



Advertisements
Similar presentations
Testing a Claim about a Proportion Assumptions 1.The sample was a simple random sample 2.The conditions for a binomial distribution are satisfied 3.Both.
Advertisements

Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
Is it statistically significant?
1 1 Slide STATISTICS FOR BUSINESS AND ECONOMICS Seventh Edition AndersonSweeneyWilliams Slides Prepared by John Loucks © 1999 ITP/South-Western College.
Chapter 10 Section 2 Hypothesis Tests for a Population Mean
Lesson Inferences Between Two Variables. Objectives Perform Spearman’s rank-correlation test.
Inferential Statistics & Hypothesis Testing
Objectives Use simulations and hypothesis testing to compare treatments from a randomized experiment.
Chapter 10: Hypothesis Testing
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Goodness-of-Fit Test.
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
Hypothesis Testing After 2 hours of frustration trying to fill out an IRS form, you are skeptical about the IRS claim that the form takes 15 minutes on.
Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.
8-3 Testing a Claim about a Proportion
BCOR 1020 Business Statistics Lecture 20 – April 3, 2008.
5-3 Inference on the Means of Two Populations, Variances Unknown
Significance Tests for Proportions Presentation 9.2.
Overview of Statistical Hypothesis Testing: The z-Test
Fundamentals of Hypothesis Testing: One-Sample Tests
Tests of significance & hypothesis testing Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics.
Let’s flip a coin. Making Data-Based Decisions We’re going to flip a coin 10 times. What results do you think we will get?
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
14 Elements of Nonparametric Statistics
Lesson Inferences about Measures of Central Tendency.
Lesson Inferences about the Differences between Two Medians: Dependent Samples.
Tests About a Population Proportion
Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,
Warm-up 9.2 Steps for a sample t-test Answers to E#2 – 5 and 10 E2. a. This is an experiment, not sample, so the condition of random Assignment.
Statistics 101 Chapter 10 Section 2. How to run a significance test Step 1: Identify the population of interest and the parameter you want to draw conclusions.
1 Chapter 8 Introduction to Hypothesis Testing. 2 Name of the game… Hypothesis testing Statistical method that uses sample data to evaluate a hypothesis.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Section A Confidence Interval for the Difference of Two Proportions Objectives: 1.To find the mean and standard error of the sampling distribution.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Chapter 11 Inferences about population proportions using the z statistic.
Minimum Sample Size Proportions on the TI Section
Math 4030 – 9a Introduction to Hypothesis Testing
Hypothesis Testing Errors. Hypothesis Testing Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean.
Lesson Nonparametric Statistics Overview. Objectives Understand Difference between Parametric and Nonparametric Statistical Procedures Nonparametric.
Lesson Test to See if Samples Come From Same Population.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
© 2010 Pearson Prentice Hall. All rights reserved Chapter Hypothesis Tests Regarding a Parameter 10.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
AP Test Practice. A student organization at a university is interested in estimating the proportion of students in favor of showing movies biweekly instead.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Ch 26 – Comparing Counts Day 1 - The Chi-Square Distribution
Testing the Difference Between Two Means
Inference about Two Means - Independent Samples
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Lecture Slides Essentials of Statistics 5th Edition
Lecture Slides Elementary Statistics Twelfth Edition
Chapters 20, 21 Hypothesis Testing-- Determining if a Result is Different from Expected.
Qualitative data – tests of association
Lesson Inferences about the Differences between Two Medians: Dependent Samples.
Inferences on Two Samples Summary
Lesson Comparing Two Means.
Chapter Nine Part 1 (Sections 9.1 & 9.2) Hypothesis Testing
Statistical Inference about Regression
Inference on Categorical Data
TESTs about a population mean
Test to See if Samples Come From Same Population
Chi2 (A.K.A X2).
Inferences Between Two Variables
Review of Chapter 10 Comparing Two Population Parameters
Chapter 11: Testing a Claim
Lecture Slides Elementary Statistics Twelfth Edition
TEST FOR RANDOMNESS: THE RUNS TEST
Testing Claims about a Population Standard Deviation
Presentation transcript:

Lesson Runs Test for Randomness

Objectives Perform a runs test for randomness Runs tests are used to test whether it is reasonable to conclude data occur randomly, not whether the data are collected randomly.

Vocabulary Runs test for randomness – used to test claims that data have been obtained or occur randomly Run – sequence of similar events, items, or symbols that is followed by an event, item, or symbol that is mutually exclusive from the first event, item, or symbol Length – number of events, items, or symbols in a run

Runs Test for Randomness ●Assume that we have a set of data, and we wish to know whether it is random, or not ●Some examples  A researcher takes a systematic sample, choosing every 10 th person who passes by … and wants to check whether the gender of these people is random  A professor makes up a true/false test … and wants to check that the sequence of answers is random

Runs, Hits and Errors A run is a sequence of similar events –In flipping coins, the number of “heads” in a row –In a series of patients, the number of “female patients” in a row –In a series of experiments, the number of “measured value was more than 17.1” in a row It is unlikely that the number of runs is too small or too large This forms the basis of the runs test

Runs Test (small case) Small-Sample Case: If n 1 ≤20 and n 2 ≤ 20, the test statistic in the runs test for randomness is r, the number of runs. Critical Values for a Runs Test for Randomness: Use Table IX (critical value at α = 0.05)

Critical Values for a Runs Test for Randomness Use Table IV, the standard normal table. Large-Sample Case: If n 1 > 20 or n 2 > 20 the test statistic in the runs test for randomness is r - μ r z = σ r where 2n 1 n 2 μ r = n 2n 1 n 2 (2n 1 n 2 – n) σ r = n²(n – 1) Let n represent the sample size of which there are two mutually exclusive types. Let n 1 represent the number of observations of the first type. Let n 2 represent the number of observations of the second type. Let r represent the number of runs. Runs Test (large case)

Hypothesis Tests for Randomness Use Runs Test Step 0 Requirements: 1) sample is a sequence of observations recorded in order of their occurrence 2) observations have two mutually exclusive categories. Step 1 Hypotheses: H 0 : The sequence of data is random. H 1 : The sequence of data is not random. Step 2 Level of Significance: (level of significance determines the critical value) Large-sample case: Determine a level of significance, based on the seriousness of making a Type I error. Small-sample case: we must use the level of significance, α = Step 3 Compute Test Statistic: Step 4 Critical Value Comparison: Reject H 0 if Step 5 Conclusion: Reject or Fail to Reject r - μ r z 0 = σ r Small-Sample: r Large Sample: Small-Sample Case: r outside Critical interval Large-Sample Case: z 0 z α/2

Example 1 The following sequence was observed when flipping a coin: H, T, T, H, H, T, H, H, H, T, H, T, T, T, H, H The coin was flipped 16 times with 9 heads and 7 tails. There were 9 runs observed. Values n = 16 n 1 = 9 n 2 = 7 r = 9 Critical values from table IX (9,7) = 4, 14 Since 4 < r = 9 < 14, then we Fail to reject and conclude that we don’t have enough evidence to say that it is not random.

Example 2 The following sequence was observed when flipping a coin: H, T, T, H, H, T, H, H, H, T, H, T, T, T, H, H, H, T T, T, T, H, H, T, T, T, H, T, T, H, H, T, T, H, T, T, T, T The coin was flipped 38 times with 16 heads and 22 tails. There were 18 runs observed. Values n = 38 n 1 = 16 n 2 = 22 r = 18 r - μ r z =  r Since z (-0.515) > -Zα/2 (-2.32) we fail to reject and conclude that we don’t have enough evidence to say its not random. 2n 1 n 2 μ r = = n 2n 1 n 2 (2n 1 n 2 – n) σ r = = n²(n – 1) z =

Example 3, Using Confidence Intervals Trey flipped a coin 100 times and got 54 heads and 46 tails, so –n = 100 –n 1 = 54 –n 2 = 46 r - μ r z =  r We transform this into a confidence interval, PE +/- MOE.

Using Confidence Intervals ●The z-value for α = 0.05 level of significance is 1.96 LB: – = 41.0 to UB: = 60.4 ●We reject the null hypothesis if there are 41 or fewer runs, or if there are 61 or more ●We do not reject the null hypothesis if there are 42 to 60 runs

Summary and Homework Summary –The runs test is a nonparametric test for the independence of a sequence of observations –The runs test counts the number of runs of consecutive similar observations –The critical values for small samples are given in tables –The critical values for large samples can be approximated by a calculation with the normal distribution Homework –problems 1, 2, 5, 6, 7, 8, 15 from the CD