Hypothesis Theory examples.

Slides:



Advertisements
Similar presentations
1 Chi-Square Test -- X 2 Test of Goodness of Fit.
Advertisements

1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Chapter 16 Introduction to Nonparametric Statistics
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 12 Chi-Square Tests and Nonparametric Tests
Statistics Are Fun! Analysis of Variance
Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008.
Statistics for Managers Using Microsoft® Excel 5th Edition
Aaker, Kumar, Day Seventh Edition Instructor’s Presentation Slides
Chapter 9 Hypothesis Testing.
The Chi-square Statistic. Goodness of fit 0 This test is used to decide whether there is any difference between the observed (experimental) value and.
Aaker, Kumar, Day Ninth Edition Instructor’s Presentation Slides
1 Level of Significance α is a predetermined value by convention usually 0.05 α = 0.05 corresponds to the 95% confidence level We are accepting the risk.
NONPARAMETRIC STATISTICS
Copyright © Cengage Learning. All rights reserved. 14 Elements of Nonparametric Statistics.
Tests for Random Numbers Dr. Akram Ibrahim Aly Lecture (9)
Chi-squared Tests. We want to test the “goodness of fit” of a particular theoretical distribution to an observed distribution. The procedure is: 1. Set.
Wilcoxon rank sum test (or the Mann-Whitney U test) In statistics, the Mann-Whitney U test (also called the Mann-Whitney-Wilcoxon (MWW), Wilcoxon rank-sum.
Nonparametric Statistics. In previous testing, we assumed that our samples were drawn from normally distributed populations. This chapter introduces some.
1 Nonparametric Statistical Techniques Chapter 17.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Outline of Today’s Discussion 1.The Chi-Square Test of Independence 2.The Chi-Square Test of Goodness of Fit.
1 Nonparametric Statistical Techniques Chapter 18.
Testing of Hypothesis. Test of Significance A procedure to assess the significance of a statistics that a sample statistics would differ from a given.
Testing for a difference
Chapter 12 Chi-Square Tests and Nonparametric Tests
DTC Quantitative Methods Bivariate Analysis: t-tests and Analysis of Variance (ANOVA) Thursday 20th February 2014  
NONPARAMETRIC STATISTICS
Nonparametric test Nonparametric tests are decoupled from the distribution so the tested attribute may also be used in the case of arbitrary distribution,
One-Sample Tests of Hypothesis
CHAPTER 11 CHI-SQUARE TESTS
PCB 3043L - General Ecology Data Analysis.
Chapter 12 Tests with Qualitative Data
John Loucks St. Edward’s University . SLIDES . BY.
Examples of testing the mean and the proportion with single samples
Hypothesis Testing: Hypotheses
Tests of significance: The basics
Inferential Statistics
Environmental Modeling Basic Testing Methods - Statistics
Chapter 11 Goodness-of-Fit and Contingency Tables
Chapter 11 Inferences About Population Variances
9 Tests of Hypotheses for a Single Sample CHAPTER OUTLINE
Statistical Tests PhD Course.
Chapter 9 Hypothesis Testing.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Introduction to Statistics for Business Application
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Non-parametric tests, part A:
One-Way Analysis of Variance
Virtual University of Pakistan
CHAPTER 11 Inference for Distributions of Categorical Data
The Rank-Sum Test Section 15.2.
NONPARAMETRIC METHODS
CHAPTER 11 CHI-SQUARE TESTS
Hypothesis Tests for a Standard Deviation
A paired-samples t-test compares the means of two related sets of data to see if they differ statistically. IQ Example We may want to compare the IQ scores.
Testing Hypotheses about a Population Proportion
What are their purposes? What kinds?
CHAPTER 11 Inference for Distributions of Categorical Data
Copyright © Cengage Learning. All rights reserved.
Nonparametric Statistics
Chapter Fifteen Frequency Distribution, Cross-Tabulation, and
CHAPTER 11 Inference for Distributions of Categorical Data
Last Update 12th May 2011 SESSION 41 & 42 Hypothesis Testing.
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 9 Hypothesis Testing: Single Population
Testing Hypotheses about a Population Proportion
CHAPTER 11 Inference for Distributions of Categorical Data
Testing Hypotheses about a Population Proportion
Presentation transcript:

Hypothesis Theory examples

An automatic cutter machine must cut steel strips of 1200 mm length An automatic cutter machine must cut steel strips of 1200 mm length. From preliminary data we checked that the lengths of the pieces produced by the machine can be considered as normal random variables with a 3 mm standard deviation. We want to make sure that the machine is set correctly. Therefore 16 pieces of the products are randomly selected and weighed. The figures were in mm: 1193,1196,1198,1195,1198,1199,1204,1193,1203,1201,1196,1200,1191,1196,1198,1191. Examine whether there is any significant deviation from the required size.

As we know the standard deviation of the sample, we can decide on the null hypothesis with the one sample u-test. The calculated value of T test statistic Since in absolute terms this is greater than the critical value, at this significance level, null hypothesis is rejected, i.e. the length of the strips is significantly different from the etalon value, the cutters have to be calibrated again.

The length of a certain product is 1000 mm The length of a certain product is 1000 mm. We know that the fluctuation of the length is normal distribution around the prescribed value. Consider the following 10-element pattern: 983,1002,998,996,1002,983,994,991,1005,986. Is the null hypothesis acceptable, that the expected length of the length is 1000?

Earlier experience in a textile plant showed that the number of yarn tearing in a particular machine type and yarn followed Poisson distribution with lambda = 8. Let's check the null hypothesis that the nowadays measured data also follows this Poisson distribution.

Using the following given hundred-year sample, decide on the null hypothesis that the distribution of the average temperature of Budapest's air in January is normal. Make the decision with Kolmogorov-Smirnov test. Perform the test with a chi square test, too.

First we estimate the expectation with the sample mean and the deviation with the sample standard deviation: With these data we can give the theoretical pdf as After sorting the data, we create the empirical distribution function. Calculate the substitute values of the theoretical distribution in the jumping points using the normal distribution table. Then we determine the maximum absolute value of the differences.

The critical value of the Kolmogorov-Smirnov test can be found in the table below At the 0.05 significance level, the null hypothesis is accepted

First we prepare the ordered sample with frequencies

Then we calculate the estimations With this estimations we calculate

We calculate the differencies between the F values and the percentiles:

… then we determine the greatest and smallest differences :

Performing goodness of fit chi square test We have to perform estimated goodness of fit chi square test. The first step is the estimating the expected value with the mean and the theoretical deviation with sample standard deviation. After this we can define the hypothetical distribution function. Because we execute two parameter estimating, so finally we have to draw 2 from the degree of freedom.

We create 8 groups (r=8). The probabilities of the groups are calculated with the hypothetical distribution function using the normal distribution table:

From these data the test statistics can be calculated The signicance level: 0.05 The degree of fredom: r-1-k=8-1-2=5 The critical value: 11.07 We accept the goodness fit to the normal distribution.

Examine with chi square test that the distributions the average temperatures of January in Budapest are the same between 1861-1910 and 1911-1960.

The sample sizes are equal: We create 5 groups. The data can be summarize in the next table. From this table the test statistics is calculable

The significance level: 0.05 The degree of fredom: r-1=5-1=4 The critical value from the chi square table: 7.81 Because the calculated value of the test statistics is greater than the critical value, we reject the null hypothesis, ie the average temperature is changed significantly in 50 years in Budapest. We have probably experienced a change in climate. (Global warming…)

We will decide with Mann Whitney U Test. n1=n2=5.

The critical value of U can be found in the table below The critical value of U can be found in the table below. To determine the appropriate critical value we need sample sizes (for Example: n1=n2=5) and our two-sided level of significance (α=0.05). For our Example the critical value is 2, and the decision rule is to reject H0 if U < 2. We do not reject H0 because 3 > 2. We do not have statistically significant evidence at α =0.05, to show that the two populations of numbers of episodes of shortness of breath are not equal. However, in this example, the failure to reach statistical significance may be due to low power. The sample data suggest a difference, but the sample sizes are too small to conclude that there is a statistically significant difference.

Consider a clinical investigation to assess the effectiveness of a new drug designed to reduce repetitive behaviors in children affected with autism. If the drug is effective, children will exhibit fewer repetitive behaviors on treatment as compared to when they are untreated. A total of 8 children with autism enroll in the study. Each child is observed by the study psychologist for a period of 3 hours both before treatment and then again after taking the new drug for 1 week. The time that each child is engaged in repetitive behavior during each 3 hour observation period is measured. Repetitive behavior is scored on a scale of 0 to 100 and scores represent the percent of the observation time in which the child is engaged in repetitive behavior. For example, a score of 0 indicates that during the entire observation period the child did not engage in repetitive behavior while a score of 100 indicates that the child was constantly engaged in repetitive behavior. The data are shown below. Looking at the data, it appears that some children improve (e.g., Child 5 scored 80 before treatment and 20 after treatment), but some got worse (e.g., Child 3 scored 40 before treatment and 50 after treatment). Is there statistically significant improvement in repetitive behavior after 1 week of treatment?

Solution with Wilcoxon Signed Rank Test First, we compute difference scores for each child.

The next step is to rank the difference scores The next step is to rank the difference scores. We first order the absolute values of the difference scores and assign rank from 1 through n to the smallest through largest absolute values of the difference scores, and assign the mean rank when there are ties in the absolute values of the difference scores.

The final step is to attach the signs ("+" or "-") of the observed differences to each rank as shown below.

The Wilcoxon Signed Rank Test concern the population median of the difference scores. The research hypothesis can be one- or two-sided. Here we consider a two-sided test. H0: The median difference is zero versus H1: The median difference is positive α=0.05 The test statistic for the Wilcoxon Signed Rank Test is W, defined as the smaller of W+ (sum of the positive ranks) and W- (sum of the negative ranks). If the null hypothesis is true, we expect to see similar numbers of lower and higher ranks that are both positive and negative (i.e., W+ and W- would be similar). If the research hypothesis is true we expect to see more higher and positive ranks (in this example, more children with substantial improvement in repetitive behavior after treatment as compared to before, i.e., W+ much larger than W-). In this example, W+ = 32 and W- = 4. Recall that the sum of the ranks (ignoring the signs) will always equal n(n+1)/2. As a check on our assignment of ranks, we have n(n+1)/2 = 8(9)/2 = 36 which is equal to 32+4. The test statistic is W = 4. Next we must determine whether the observed test statistic W supports the null or research hypothesis. This is done following the same approach used in parametric testing. Specifically, we determine a critical value of W such that if the observed value of W is less than or equal to the critical value, we reject H0 in favor of H1, and if the observed value of W exceeds the critical value, we do not reject H0.

To determine the appropriate two-sided critical value we need sample size (n=8) and our two-sided level of significance (α=0.05). For this example, the critical value of W is 3 and the decision rule is to reject H0 if W >3. Thus, we reject H0, because 4 >3. We have statistically significant evidence at α =0.05, to show that the median difference is non-zero (i.e., that repetitive behavior changes.)