0% found this document useful (0 votes)
85 views17 pages

Chi Squared

The chi square statistic measures how observed data compares to expected values. There are two main types of chi square tests: tests of independence, which examine relationships between variables, and goodness-of-fit tests, which examine how well an observed distribution fits an expected one. Chi square tests use degrees of freedom and p-values to determine whether to reject the null hypothesis that there is no relationship or difference between the observed and expected values.

Uploaded by

Anthony Abesado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views17 pages

Chi Squared

The chi square statistic measures how observed data compares to expected values. There are two main types of chi square tests: tests of independence, which examine relationships between variables, and goodness-of-fit tests, which examine how well an observed distribution fits an expected one. Chi square tests use degrees of freedom and p-values to determine whether to reject the null hypothesis that there is no relationship or difference between the observed and expected values.

Uploaded by

Anthony Abesado
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Chi Square Statistic

What is Chi Square ?


• A chi square (χ2) statistic is a test that measures how expectations
compare to actual observed data (or model results).
• The data used in calculating a chi square statistic must be random,
raw, mutually exclusive, drawn from independent variables, and
drawn from a large enough sample.
Other Properties of Chi Square test
• There are two main kinds of chi square tests: the test of
independence, which asks a question of relationship, such as, "Is
there a relationship between gender and SAT scores?"; and
the goodness-of-fit test, which asks something like "If a coin is tossed
100 times, will it come up heads 50 times and tails 50 times?"
Other Properties of Chi Square test
• For these tests, degrees of freedom are utilized to determine if a
certain null hypothesis can be rejected based on the total number of
variables and samples within the experiment.
• A chi square (χ2) statistic is a test that measures how expectations
compare to actual observed data.
• There are two main kinds of chi square tests: the test of
independence for data and tests of goodness of fit for a model.
• These tests can be used to determine if a certain null hypothesis can
be rejected in hypothesis testing.
Application
• You research two groups and put them in categories single, married
or divorced:

• The numbers are definitely different, but ...
• Is that just random chance?
• Or have you found something interesting?

• The Chi-Square Test gives a "p" value to help you decide!


What is the “p value”?
Important Points
• This test only works for categorical data (data in categories), such as
Gender {Men, Women} or color {Red, Yellow, Green, Blue} etc, but not
numerical data such as height or weight.
• The numbers must be large enough. Each entry must be 5 or more. In
our example we have values such as 209, 282, etc, so we are good to
go.
First step: State the Hypotheses
• Gender and preference for cats or dogs are independent.
• Gender and preference for cats or dogs are not independent.
Layout the data
Calculate:
Calculate:
Calculate:
From Chi-Square to p
• To get from Chi-Square to p-value is a difficult calculation, so either
look it up in a table, or use the Chi-Square Calculator.
• But first you will need a "Degree of Freedom" (DF)
• Calculate Degrees of Freedom
• Multiply (rows − 1) by (columns − 1)
• Example: DF = (2 − 1)(2 − 1) = 1×1 = 1
• Result
• The result is:
• p = 0.04283
Summary
• A chi square (χ2) statistic is a test that measures how expectations
compare to actual observed data.
• There are two main kinds of chi square tests: the test of
independence for data and tests of goodness of fit for a model.
• These tests can be used to determine if a certain null hypothesis can
be rejected in hypothesis testing.

You might also like