100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Chi Squared Tests CA$7.16
Add to cart

Class notes

Chi Squared Tests

 1 view  0 purchase

An intro to Chi-Squared Tests

Preview 2 out of 5  pages

  • January 7, 2025
  • 5
  • 2024/2025
  • Class notes
  • Olivia podolak lewandowska
  • All classes
All documents for this subject (8)
avatar-seller
sobikaaravi
Chi-Squared Tests‬


‭➔‬‭goodness-of-fit test is used for 1 independent variable‬
‭➔‬‭x‭2‬ ‬ ‭test of independence is used for 2 variables‬

‭The X‬‭2‬ ‭Goodness-of-fit Test‬
‭➔‬‭an extension of the binomial test‬
‭◆‬ ‭essentially testing if own probabilities matches expected set‬
‭➔‬‭comparing observed distribution to the expected distribution‬
‭◆‬ ‭opposed to a single observation against the expected distribution‬
‭➔‬‭tests probability of observing specific number of frequencies for 2/more categories‬
‭◆‬ ‭relative to expected frequency‬
‭◆‬ ‭tests the extent to which an observed pattern of observations (frequencies)‬
‭conforms/fits the expected pattern‬
‭●‬ ‭how well do the observed frequencies “fit” with the expected frequencies‬
‭➔‬‭Example:‬‭A gas station owner believes an equal number‬‭of customers prefer to buy gasoline on‬
‭every day of the week. A manager at the service station disagrees with the owner and claims that‬
‭the number of customers who prefer to buy gasoline on each day of the week varies. The owner‬
‭surveyed 739 customers over time to record each customer’s preferred day of the week. The data‬
‭are summarized in the table below.‬


‭Mon‬ ‭Tues‬ ‭Wed‬ ‭Thur‬ ‭Fri‬ ‭Sat‬ ‭Sun‬

‭Freq.‬ ‭103‬ ‭103‬ ‭126‬ ‭103‬ ‭111‬ ‭96‬ ‭97‬


‭-‬ ‭the expected it the number of people surveyed divided by the number of days in the week‬
‭-‬ ‭ = 105.5‬
‭➔‬‭x‬ ‭goodness-of-fit test is a non-parametric test (just‬‭adding frequencies)‬
‭2‬


‭◆‬ ‭doesn’t rely on estimating population parameters‬
‭◆‬ ‭doesn’t require‬‭typical‬‭parametric assumptions‬
‭➔‬‭x‭2‬ ‬ ‭goodness-of-fit test assumptions‬
‭◆‬ ‭the IV consists of mutually exclusive and exhaustive categories‬
‭◆‬ ‭independence of observations‬
‭●‬ ‭on observation only fits into one subject‬
‭○‬ ‭i.e. a person that comes to the gas station on friday can’t go any other day‬
‭◆‬ ‭expected frequencies for each category is 5/more‬

, ‭●‬ ‭due to the x‬‭2‬ ‭statistics being calculated using frequencies (continuous measure)‬
‭and approximates continuous variable when N is large‬
‭○‬ ‭small N = a weird chi-squared distribution‬
‭➔‬‭formula‬‭:‬‭∑(observed frequency - expected frequency)‬‭2‬ ‭/ expected frequency‬
‭◆‬ ‭used for both goodness-of-fit and test of independence‬
‭◆‬ ‭finding the difference between observed and expected because it shows how much the‬
‭observed deviates from the expected‬
‭●‬ ‭squared because would otherwise be 0‬
‭◆‬ ‭divided by the expected frequency because it standardizes the difference between‬
‭observed|observed‬
‭●‬ ‭planned a dinner party expecting 5 guests, but 3 extra people show up is different‬
‭when you plan a house party for 80 and 3 extra people show up‬
‭➔‬‭the formula could also be rewritten using probabilities‬
‭◆‬ ‭N‬‭∑(P‬‭Oi‬ ‭- P‬‭Ei‬‭)‭2‬ ‬ ‭/ P‬‭Ei‬
‭●‬ ‭P‬‭Oi‬ ‭= probabilities of observed‬
‭●‬ ‭P‬‭Ei‬ ‭= probabilities of expected‬
‭●‬ ‭N = total number of observations‬
‭➔‬‭increase N increases the X‬‭2‭,‬ increasing the likelihood‬‭of reject the H0 (null)‬
‭◆‬ ‭type 1 error‬
‭◆‬ ‭hence the need for the equivalent of an effect size for X‬‭2‬
‭➔‬‭E = N/K = 739/7 = 105.57 (*don’t round, keep up to 4 decimal places for the exam)‬
‭➔‬‭X‬‭2‬ ‭= [(103 - 105.57)‬‭2‬ ‭/ 105.57] + [(103 - 105.57)‬‭2‬ ‭/ 105.57] + [(126 - 105.57)‬‭2‬ ‭/ 105.57] +‬
‭[(103 - 105.57)‬‭2‬ ‭/ 105.57] + [(111 - 105.57)‬‭2‬ ‭/ 105.57]‬‭+ [(96 -105.57)‬‭2‬ ‭/ 105.57] [(97‬
‭-105.57)‬‭2‬ ‭/ 105.57]‬
‭◆‬ ‭= 5.98‬
‭➔‬‭the calculated score will never be a negative (if it is a negative it usually means forgot to square)‬
‭◆‬ ‭because this test is not around the mean and is one-tailed, the distribution will always be‬
‭on the positive side (still looking at whether the score falls within the 5% significance‬
‭range)‬
‭➔‬‭as number of groups being looked at increases, the critical value also increases‬
‭➔‬‭degree of freedom = k -1‬
‭◆‬ ‭k= number of groups‬

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller sobikaaravi. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$7.16. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

51292 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 15 years now

Start selling
CA$7.16
  • (0)
Add to cart
Added