Testing for a difference

Slides:



Advertisements
Similar presentations
Introductory Mathematics & Statistics for Business
Advertisements

Tests of Hypotheses Based on a Single Sample
Mann-Whitney U-test Testing for a difference U 1 = n 1 n 2 + ½ n 1 (n 1 + 1) – R 1.
T-test - unpaired Testing for a difference. What does it do? Tests for a difference in means Compares two cases (eg areas of lichen found in two locations)
Statistical Techniques I
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 16 l Nonparametrics: Testing with Ordinal Data or Nonnormal Distributions.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 9 Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and.
1 Difference Between the Means of Two Populations.
PSY 307 – Statistics for the Behavioral Sciences
Fundamentals of Hypothesis Testing. Identify the Population Assume the population mean TV sets is 3. (Null Hypothesis) REJECT Compute the Sample Mean.
Chapter 14 Conducting & Reading Research Baumgartner et al Chapter 14 Inferential Data Analysis.
Two Population Means Hypothesis Testing and Confidence Intervals With Unknown Standard Deviations.
Chapter 9 Hypothesis Testing.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
Statistical hypothesis testing – Inferential statistics I.
AM Recitation 2/10/11.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Statistical Analysis Statistical Analysis
Chi-squared Testing for a difference. What does it do? Compares numbers of people/plants/species… in different categories (eg different pollution levels,
Chi-squared Goodness of fit. What does it do? Tests whether data you’ve collected are in line with national or regional statistics.  Are there similar.
Statistical Analysis A Quick Overview. The Scientific Method Establishing a hypothesis (idea) Collecting evidence (often in the form of numerical data)
Correlation – Pearson’s. What does it do? Measures straight-line correlation – how close plotted points are to a straight line Takes values between –1.
Introduction to Inferential Statistics Statistical analyses are initially divided into: Descriptive Statistics or Inferential Statistics. Descriptive Statistics.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
T-test - paired Testing for a difference. What does it do? Tests for a difference in means Compares two cases (eg soil moisture content north & south.
11.5 Testing the Difference Between Two Variances
© Copyright McGraw-Hill 2004
Correlation. u Definition u Formula Positive Correlation r =
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
Wilcoxon Signed Rank Testing for a difference R+ RR
Chi-squared Association Index. What does it do? Looks for “links” between two factors  Do dandelions and plantains tend to grow together?  Does the.
Correlation – Spearman’s. What does it do? Measures rank correlation – whether highest value in the 1 st data set corresponds to highest in the 2 nd set.
Slide 20-1 Copyright © 2004 Pearson Education, Inc.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
A.P. STATISTICS EXAM REVIEW TOPIC #2 Tests of Significance and Confidence Intervals for Means and Proportions Chapters
Statistics for A2 Biology Standard deviation Student’s t-test Chi squared Spearman’s rank.
Testing for a difference
STA 291 Spring 2010 Lecture 19 Dustin Lueker.
Statistical Analysis: Chi Square
9.3 Hypothesis Tests for Population Proportions
Comparing Systems Using Sample Data
Chapter 9 Hypothesis Testing.
Testing the Difference between Means and Variances
Two-Sample Hypothesis Testing
Hypothesis Testing: One Sample Cases
Hypothesis testing Chapter S12 Learning Objectives
Business Statistics Topic 7
Testing for a difference
Hypothesis Tests for 1-Sample Proportion
Hypothesis Testing: Hypotheses
Introduction to Inferential Statistics
Inferential Statistics
Hypothesis Tests for a Population Mean in Practice
Chapter 9 Hypothesis Testing.
Chapter 9 Hypothesis Testing.
Testing the Difference Between Two Variances
Chapter Nine Part 1 (Sections 9.1 & 9.2) Hypothesis Testing
Hypothesis Testing.
Comparing two Rates Farrokh Alemi Ph.D.
Chi-squared Association Index
Hypothesis Testing and Confidence Intervals
Hypothesis Tests for a Standard Deviation
Chapter 8 Hypothesis Tests
Hypothesis Testing: The Difference Between Two Population Means
Statistical Test A test of significance is a formal procedure for comparing observed data with a claim (also called a hypothesis) whose truth we want to.
Presentation transcript:

Testing for a difference t-test - paired Testing for a difference Note: this is for paired data. If the data isn’t paired, use unpaired t-test

What does it do? Tests for a difference in means Compares two cases (eg soil moisture content north & south of a hedge) Data must occur in natural pairs Measurements at matched points on either side of a hedge Measurements at corresponding points on two shores Two measurements on the same person The pairing must be “natural” – you cannot just pair data up arbitrarily.

Planning to use it? Make sure that… Your data occur in natural pairs You have five or more pairs of values Your data are normally distributed Only continuous data (lengths, weights etc) can be normally distributed You can do a check by seeing if your data look roughly like this: If in doubt whether it’s normal, it’s better to use Wilcoxon If your data are not normal, but are paired, use Wilcoxon If your data are normal, but are not paired, use unpaired t-test

How does it work? You assume (null hypothesis) there is no difference between the two means The test works with the differences of the pairs of values. If, for example, the values in the first sample were all much bigger, then all the differences would be positive The mean and standard deviation of the differences is calculated, and put into a formula.

Doing the test These are the stages in doing the test: Write down your hypotheses Finding the differences Finding the mean & standard deviation Use the formula to calculate the t-value Write down the degrees of freedom Look at the tables Make a decision The underlined terms are hyperlinks to the appropriate slide Click here for an example

Hypotheses H0: mean1 = mean2 For H1, you have a choice, depending on what alternative you were looking for. H1: mean1 > mean2 eg: Soil moisture content is higher on the north of the hedge than the south of the hedge or H1: mean1  mean2 eg: Soil moisture content is different on the north and south sides of the hedge. Unless you have a good biological reason for expecting one to be larger, you should choose “different” for H1 The form of the alternative hypothesis should be chosen before getting the data – to ensure there really is a good reason for 1-tailed version, if chosen.

Differences Work out the differences between the pairs of values, including signs Always do sample 1 – sample 2 not the other way round, where sample 1 is the one you expect to have larger values This should minimise the number of negative signs – which should reduce errors.

Mean & Standard Deviation To find the mean of your differences, add them all up and divide by how many there are To find the standard deviation s, use the formula n = number of values Sx2 = total of the squares of the differences See spreadsheet presentation for more details These calculations can be done on a spreadsheet or graphic calculator

Formula Substitute your values into the formula = mean of the differences s = standard deviation of the differences n = number of values There are other variants of this formula, but they come to the same thing

Degrees of freedom The formula here for degrees of freedom is degrees of freedom = n – 1 Where n is the number of values You do not need to worry about what this means –just make sure you know the formula! But in case you’re interested – the fewer values you have, the more likely you are to get a large t-value by chance – so the higher your value has to be to be significant.

Tables This is a t table Significance levels - note different values for 1 and 2-tailed This is a t table Degrees of freedom Some tables just quote 1-tail significance levels (or just 2 tail). Double 1-tail levels to get 2-tail levels

Make a decision If your value is bigger than the tables value then you can reject the null hypothesis. Otherwise you must accept it. Make sure you choose the right tables value – it depends whether your test is 1 or 2 tailed: If you are using H1: mean1 > mean 2, you are doing a 1-tailed test If you are using H1: mean1  mean 2, you are doing a 2-tailed test If you are doing a 1-tailed test and the t-value ends up negative, when you expected it to be positive – then you can’t reject H0 (and should probably go back and check your data & assumptions)

Example: Soil Moisture North & South of Hedge Data were obtained for soil moisture content at seven matched points north and south of a hedge. Hypotheses: H0: Mean moisture content on north = mean moisture content on south. H1 Mean moisture content on north > mean moisture content on south

The data Site 1 2 3 4 5 6 7 North 4.09 2.93 3.88 10.50 3.50 5.14 4.63 South 4.65 6.00 3.47 4.33 2.20 2.50 3.33

Differences We are expecting the North side to have a higher moisture content. So we do North - South N 4.09 2.93 3.88 10.50 3.50 5.14 4.63 S 4.65 6.00 3.47 4.33 2.20 2.50 3.33 N – S -0.56 -3.07 0.41 6.17 1.30 2.64 1.30

Mean & Standard Deviation Our data (the differences) are: -0.56 -3.07 0.41 6.17 1.30 2.64 1.30 Sx2 = (-0.56)2 + (-3.07)2 + … + 2.642 + 1.302 = 58.3251

The test Degrees of freedom = 7 – 1 = 6 We are doing a 1-tailed test Tables value (5%) = 1.943 Since our value is smaller than the tables value, we accept H0 – the moisture content on the north is not significantly higher.