Chi-Squared Tutorial This is significantly important. Get your AP Equations and Formulas sheet.

Slides:



Advertisements
Similar presentations
What is Chi Square? Chi square is a “goodness of fit” test.
Advertisements

Chapter 12: Testing hypotheses about single means (z and t) Example: Suppose you have the hypothesis that UW undergrads have higher than the average IQ.
Finish Anova And then Chi- Square. Fcrit Table A-5: 4 pages of values Left-hand column: df denominator df for MSW = n-k where k is the number of groups.
Chi-Square Test Chi-square is a statistical test commonly used to compare observed data with data we would expect to obtain according to a specific hypothesis.
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
What is a χ2 (Chi-square) test used for?
Laws of Probability and Chi Square
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Quantitative Skills 4: The Chi-Square Test
Hypothesis Testing IV Chi Square.
Physics 270 – Experimental Physics. Let say we are given a functional relationship between several measured variables Q(x, y, …) What is the uncertainty.
Analysis of frequency counts with Chi square
CHAPTER 11 Inference for Distributions of Categorical Data
Chi-square notes. What is a Chi-test used for? Pronounced like kite, not like cheese! This test is used to check if the difference between expected and.
Chi-Square Test.
Confidence Intervals, Hypothesis Testing
Statistics made simple Modified from Dr. Tammy Frank’s presentation, NOVA.
Chi-square Goodness of Fit Test
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Test for Goodness of Fit. The math department at a community college offers 3 classes that satisfy the math requirement for transfer in majors that do.
Chi-Square Test A fundamental problem in genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
Statistical Analysis Statistical Analysis
Chi Square Analysis  Use to see if the observed value varies from the expected value.  Null Hypothesis – There is no difference between the observed.
Chi-Square Test A fundamental problem in genetics is determining whether the experimentally determined data fits the results expected from theory. How.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Chapter 11: Inference for Distributions of Categorical Data Section 11.1 Chi-Square Goodness-of-Fit Tests.
The binomial applied: absolute and relative risks, chi-square.
Chi-Square Test.
Chi-Squared Analysis Stickrath.
Chi-Squared (  2 ) Analysis AP Biology Unit 4 What is Chi-Squared? In genetics, you can predict genotypes based on probability (expected results) Chi-squared.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
The Statistical Analysis of Data. Outline I. Types of Data A. Qualitative B. Quantitative C. Independent vs Dependent variables II. Descriptive Statistics.
Chi Squared Test. Why Chi Squared? To test to see if, when we collect data, is the variation we see due to chance or due to something else?
Chi square analysis Just when you thought statistics was over!!
Warm up On slide.
Non-parametric tests (chi-square test) Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics.
Physics 270 – Experimental Physics. Let say we are given a functional relationship between several measured variables Q(x, y, …) x ±  x and x ±  y What.
Sampling  When we want to study populations.  We don’t need to count the whole population.  We take a sample that will REPRESENT the whole population.
Chi Square Analysis The chi square analysis allows you to use statistics to determine if your data “good” or not. In our fruit fly labs we are using laws.
Scientific Method Probability and Significance Probability Q: What does ‘probability’ mean? A: The likelihood that something will happen Probability.
Chapter 8 Parameter Estimates and Hypothesis Testing.
Chi-Square Analysis AP Biology.
Chi-Square Test. Chi-Square (χ 2 ) Test Used to determine if there is a significant difference between the expected and observed data Null hypothesis:
Did Mendel fake is data? Do a quick internet search and can you find opinions that support or reject this point of view. Does it matter? Should it matter?
The Chi Square Equation Statistics in Biology. Background The chi square (χ 2 ) test is a statistical test to compare observed results with theoretical.
III. Statistics and chi-square How do you know if your data fits your hypothesis? (3:1, 9:3:3:1, etc.) For example, suppose you get the following data.
DRAWING INFERENCES FROM DATA THE CHI SQUARE TEST.
Chi Square Pg 302. Why Chi - Squared ▪Biologists and other scientists use relationships they have discovered in the lab to predict events that might happen.
Chi-Square (χ 2 ) Analysis Statistical Analysis of Genetic Data.
Chi Square Analysis. What is the chi-square statistic? The chi-square (chi, the Greek letter pronounced "kye”) statistic is a nonparametric statistical.
Scientists typically collect data on a sample of a population and use this data to draw conclusions, or make inferences, about the entire population. (for.
Chi-Square Analysis AP Biology.
Statistical Analysis: Chi Square
I. CHI SQUARE ANALYSIS Statistical tool used to evaluate variation in categorical data Used to determine if variation is significant or instead, due to.
Chi Squared Test.
The Chi Squared Test.
Statistical Analysis Chi Square (X2).
Inferential Statistics
Chi Square.
Chi square.
Chi Squared Test.
Chi Square (2) Dr. Richard Jackson
Chi2 (A.K.A X2).
Chi-Squared AP Biology.
Copyright © Cengage Learning. All rights reserved.
How do you know if the variation in data is the result of random chance or environmental factors? O is the observed value E is the expected value.
Graphs and Chi Square.
Chi square.
Presentation transcript:

Chi-Squared Tutorial This is significantly important. Get your AP Equations and Formulas sheet

The Purpose The chi-squared analysis exists to help us determine whether two sets of data have a significant difference. – Remember early in the semester when I said how scientists use the word “significant” only when they really mean it? This is one method to tell if you can use the word. Take a biostatistics course in college and you’ll learn a buttload more.

The Null Hypothesis Also recall that every experiment has a null hypothesis. – The “not very interesting” possibility, a.k.a. there is no difference between two sets of numbers. In order to accept your own hypothesis, you must reject the null hypothesis. – In other words, determine if the results are significant. The chi-squared test is one way to tell if you can do that.

An Example To resurrect this analogy and then kill it again, suppose you flip a coin 10 times. – You get 6 heads and 4 tails. – Is something fishy? That’s a 60% heads rate. If you flip 100 times and get 60 heads and 40 tails, that’s the same rate. – Now you might think something’s wrong. – But where do you draw the line? How many flips does it take? – Looks like you need one of them chi-squared tests.

The Chi-Squared Test The Greek letter chi is basically an χ, so the chi-squared test usually goes by the name χ 2. To perform the test, you need the following: – Data you observe (o). – Data you expect (e). – The degrees of freedom (df). For example, in the 100 flip test, you’d expect 50 heads, but you observed 60 heads.

The Chi-Squared Test: Step 1 Determine the difference between observed and expected numbers: 60 observed – 50 expected = 10 heads difference. Square the difference: 10 2 = 100. Divide by what you expected: 100/50 = 2. Do the same for all calculated “differences” and add them together. 40 observed – 50 expected = -10 tails difference, squared to 100, divided by 50 = = 4.

The Chi-Squared Test: Step 2 That “4” we got as our answer is the calculated chi-squared statistic (χ 2 calc ) for our test. – The higher this is relatively speaking, the less “random chance” can play a role. – It’s called “calculated” because…you just…calculated it. We will compare this statistic to another number to see if this indicates more variation than chance would suggest, or not.

The Chi-Squared Test: Step 2 The number to which you’ll compare the calculated χ 2 value is called the critical chi- squared value (χ 2 crit ). To figure out how to get the critical value, you need to know one other thing – the degrees of freedom.

The Chi-Squared Test: Step 3 Degrees of freedom goes by “df” and represents…well…this is hard to explain. Let’s try this: – I flipped 100 times and got 60 heads. Once I know how many times I got heads, the number of times I got tails is a given. – As a result, though there are two outcomes, there is only one degree of freedom. Typically, df is the number of possible outcomes minus one.

The Chi-Squared Test: Step 4 p value reflects probability of chance and is frequently given by alpha (  ). Traditionally, scientists need 95% confidence that something is not caused by chance to reject the null hypothesis. Therefore, we need a p value of 0.05 or less. p=0.05 means it’s only 5% likely to be chance.

The Chi-Squared Test: Step 5 Finally, you look up the value of χ 2 critical in a chi-squared analysis table. – Make sure your p value is 0.05 (or whatever is specified by the problem/experiment). Once you have both χ 2 critical and χ 2 calculated, compare: χ 2 crit > χ 2 calc ? Accept the null hypothesis. There is no significant difference. χ 2 crit ≤ χ 2 calc ? Reject the null hypothesis. There’s something going on here.

The Chi-Squared Test: Step 5 df/prob Insignificant (accept null hypothesis) Significant (reject null hypothesis)

The Chi-Squared Test: Step 6 At p=0.05 (5% likelihood it’s chance) and 1 DF, χ 2 crit is 3.84, which is less than the “4” we got. Since χ 2 crit ≤ χ 2 calc, we can reject the null hypothesis. – Something’s up with this coin. Just so you know, doing this with 6/4 heads/tails leads to a χ 2 calc of 0.4, which is not a significant result. Let’s look at the table for χ 2 calc = 0.4.

The Chi-Squared Test: Step 5 df/prob Insignificant (accept null hypothesis) Significant (reject null hypothesis)

6 Heads, 4 Tails Our χ 2 calc = 0.4 value corresponds to a p value somewhere between 0.70 and – So it’s about 60% likely to be chance that we got 6 heads. Makes sense. Computer software can often calculate an exact p value for you, but for our purposes we’ll use tables.

Chi-Squared Summary o is “observed” – What you found. e is “expected” – What you would have gotten if there were no difference.  (sigma) means “sum of” – Add all the (o-e) 2 /e results together Look up what you get for x 2 on a chi-squared table under with the right “degrees of freedom” under p=0.05. – If your x 2 value is higher, it’s a significant difference! – If not, find the closest p value.

Scientific Example: Chantix™ Remember Chantix? The anti-smoking drug we discussed earlier in the year? – How do we relate this to chi-squared testing? First, what’s the null hypothesis? – Chantix has no effect on smoking cessation. The observed data? – How many smokers quit. The expected data? – How many smokers quit…on a placebo. Degrees of freedom? – One. You either quit or you don’t.

Chi-Squared Takeaways x 2 increases with greater differences between data sets. So, to be confident it is not a chance effect, you need a bigger difference from the result of the chi-squared test than is listed on the table. With more degrees of freedom, you need an even larger difference between the data sets. Now let’s get to some M&Ms…

M&M Chi-Squared Activity Here’s the idea: – Mars says they measure out how many M&Ms of various colors are in a bag. – But are they really all equal? How can we tell? Perform a chi-squared test to find out! – Count the number of each color in your bag. – Convert the given percentages to numbers (no rounding necessary). – Complete the test and find out if your bag is significantly different from what Mars calls standard. – Note: We will pool all our data for the second half of the lab during the next class.