Chapter 14: Chi-Square Procedures

Slides:



Advertisements
Similar presentations
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
Advertisements

SpringerLink Training Kit
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
Choosing a Dental Plan Student Name
Virtual Environments and Computer Graphics
Chương 1: CÁC PHƯƠNG THỨC GIAO DỊCH TRÊN THỊ TRƯỜNG THẾ GIỚI
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
D. Phát triển thương hiệu
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Nasal Cannula X particulate mask
Evolving Architecture for Beyond the Standard Model
HF NOISE FILTERS PERFORMANCE
Electronics for Pedestrians – Passive Components –
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
L-Systems and Affine Transformations
CMSC423: Bioinformatic Algorithms, Databases and Tools
Some aspect concerning the LMDZ dynamical core and its use
Bayesian Confidence Limits and Intervals
实习总结 (Internship Summary)
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Face Recognition Monday, February 1, 2016.
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
انتقال حرارت 2 خانم خسرویار.
Summer Student Program First results
Theoretical Results on Neutrinos
HERMESでのHard Exclusive生成過程による 核子内クォーク全角運動量についての研究
Wavelet Coherence & Cross-Wavelet Transform
yaSpMV: Yet Another SpMV Framework on GPUs
Creating Synthetic Microdata for Higher Educational Use in Japan: Reproduction of Distribution Type based on the Descriptive Statistics Kiyomi Shirakawa.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Fuel cell development program for electric vehicle
Overview of TST-2 Experiment
Optomechanics with atoms
داده کاوی سئوالات نمونه
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
ლექცია 4 - ფული და ინფლაცია
10. predavanje Novac i financijski sustav
Wissenschaftliche Aussprache zur Dissertation
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Y V =0 a V =V0 x b b V =0 z
Fairness-oriented Scheduling Support for Multicore Systems
Climate-Energy-Policy Interaction
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Ch48 Statistics by Chtan FYHSKulai
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Online Learning: An Introduction
Factor Based Index of Systemic Stress (FISS)
What is Chemistry? Chemistry is: the study of matter & the changes it undergoes Composition Structure Properties Energy changes.
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
The Toroidal Sporadic Source: Understanding Temporal Variations
FW 3.4: More Circle Practice
ارائه یک روش حل مبتنی بر استراتژی های تکاملی گروه بندی برای حل مسئله بسته بندی اقلام در ظروف
Decision Procedures Christoph M. Wintersteiger 9/11/2017 3:14 PM
Limits on Anomalous WWγ and WWZ Couplings from DØ
Presentation transcript:

Chapter 14: Chi-Square Procedures

14.1 – Test for Goodness of Fit

(2) Chi-square test for goodness of fit: Used to determine if what outcome you expect to happen actually does happen Observed Counts: Count of actual results Expected Counts: Count of expected results To find the expected counts multiply the proportion you expect times the sample size

Note: Sometimes the probabilities will be expected to be the same and sometimes they will be expected to be different

Chi-square test for goodness of fit: P: Don’t need! H: Ho: All of the proportions are as expected HA: One or more of the proportions are different from expected A: all expected counts are ≥ 5 N: GOF test T: df = k – 1 categories

Properties of the Chi-distribution: Always positive (being squared) Skewed to the right Distribution changes as degrees of freedom change

Properties of the Chi-distribution: Always positive (being squared) Skewed to the right Distribution changes as degrees of freedom change Area is shaded to the right

Calculator Tip! Goodness of Fit L1: Observed L2: Expected L3: (L1 – L2)2 / L2 List – Math – Sum – L3

Calculator Tip! P(2 > #) 2nd dist - 2cdf(2, big #, df)

Example #1 A study yields a chi-square statistic value of 20 (2 = 20). What is the P value of the test if the study was a goodness-of-fit test with 12 categories?

2nd dist - 2cdf(2, big #, df) Example #1 A study yields a chi-square statistic value of 20 (2 = 20). What is the P value of the test if the study was a goodness-of-fit test with 12 categories? 0.025 < P < 0.05 Or by calc: 2nd dist - 2cdf(2, big #, df) 2cdf(20, 10000000, 11) = 0.04534

Observed Expected 8.57 Example #2 A geneticist claims that four species of fruit flies should appear in the ratio 1:3:3:9. Suppose that a sample of 480 flies contains 25, 92, 68, and 295 flies of each species, respectively. Find the chi-square statistic and probability. Observed Expected 25 92 68 295 480/16 480/16  3 480/16  3 480/16  9 30 90 90 270 0.833 0.044 5.378 2.315 0.833 + 0.044 + 5.378 + 2.315 = 8.57

P(2 > 8.57) = df = 4 – 1 = 3

P(2 > 8.57) = df = 4 – 1 = 3 .025 < P(2 > 8.57) < 0.05 Or by calc: 2cdf(8.57, 10000000, 3) = 0.03559

Example #3 The number of defects from a manufacturing process by day of the week are as follows: The manufacturer is concerned that the number of defects is greater on Monday and Friday. Test, at the 0.05 level of significance, the claim that the proportion of defects is the same each day of the week. Monday Tuesday Wednesday Thursday Friday # 36 23 26 25 40 The proportion of defects from a manufacturing process is the same Mon-Fri H: Ho: HA: The proportion of defects from a manufacturing process is not the same Mon-Fri (on one day or more)

A: Expected Counts

Chi-Square Goodness of Fit Expected Counts Monday Tuesday Wednesday Thursday Friday # 36 23 26 25 40 30 30 30 30 30 Expected 150 errors total. 150 5 = 30 N: Chi-Square Goodness of Fit

 T: 30 30 30 30 30 (O – E)2 2 = = E 7.533 Monday Tuesday Wednesday Thursday Friday # 36 23 26 25 40 30 30 30 30 30 Expected 2 =  (O – E)2 E = 7.533

O: P(2 > 7.533) = df = 5 – 1 = 4

O: P(2 > 7.533) = df = 5 – 1 = 4 0.10 < P(2 > 7.533) > 0.15 Or by calc: 2cdf(7.533, 10000000, 4) = 0.1102

M: P ___________  > 0.1102 0.05 Accept the Null

S: There is not enough evidence to claim the proportion of defects from a manufacturing process is not the same Mon-Fri (on one day or more)

14.2 – Inference for Two-Way Tables

To compare two proportions, we use a 2-Proportion Z Test To compare two proportions, we use a 2-Proportion Z Test. If we want to compare three or more proportions, we need a new procedure.

Two – Way Table: Organize the data for several proportions R rows and C columns Dimensions are r x c

Row total x Column total To calculate the expected counts, multiply the row total by the column total, and divide by the table total: Row total x Column total table total Expected count = Degrees of Freedom: (r – 1)(c – 1)

Chi-Square test for Homogeneity: Compare two or more populations on one categorical variable Ho: The proportions are the same among all populations Ha: The proportions are different among all populations Conditions: SRS Expected Counts are ≥ 5

Chi-Square test for Association/Independence: Two categorical variables collected from a single population Ho: There is no association between two categorical variables (independent) Ha: There is an association (dependent) Conditions: SRS Expected Counts are ≥ 5

Test for Homogeneity/Independence Calculator Tip! Test for Homogeneity/Independence 2nd – matrx – edit – [A] – rxc – Table info Then: Stat – tests – 2–test Observed: [A] Expected: [B] Calculate Note: Expected: [B] is done automatically!

Row total x Column total Example #1 The table shows the number of people in each grade of high school who preferred a different color of socks. 18 18 20 15 15 12 14 56 a. What is the expected value for the number of 12th graders who prefer red socks? Row total x Column total table total 20 x 14 56 = 5 Expected count = =

Example #1 The table shows the number of people in each grade of high school who preferred a different color of socks. b. Find the degrees of freedom. (r – 1)(c – 1) (3 – 1)(4 – 1) (2)(3) 6

Row total x Column total Example #2 An SRS of a group of teens enrolled in alternative schooling programs was asked if they smoked or not. The information is classified by gender in the table. Find the expected counts for each cell, and then find the chi-square statistic, degrees of freedom, and its corresponding probability. 70 147 79 138 217 Expected Counts: Row total x Column total table total 70 x 79 217 70 x 138 217 = 25.484 = 44.516 147 x 79 217 147 x 138 217 = 53.516 = 93.484

Expected Counts: Smoker Non-Smoker Male Female 25.484 44.516 53.516 93.484 (O – E)2 E 2 =  = 0.56197 (23 – 25.484)2 25.48 (47 – 44.516)2 44.516 (56 – 53.516)2 53.516 (91 – 93.484)2 93.484 + + +

 (O – E)2 2 = = E P(2 > 0.56197) = Expected Counts: Smoker Non-Smoker Male Female 25.484 44.516 53.516 93.484 2 =  (O – E)2 E = 0.56197 Degrees of Freedom: (r – 1)(c – 1) = (2 – 1)(2 – 1) = (1)(1) = 1 P(2 > 0.56197) =

 (O – E)2 2 = = E P(2 > 0.56197) = Expected Counts: Smoker Non-Smoker Male Female 25.484 44.516 53.516 93.484 (O – E)2 E 2 =  = 0.56197 Degrees of Freedom: (r – 1)(c – 1) = (2 – 1)(2 – 1) = (1)(1) = 1 P(2 > 0.56197) = More than 0.25 OR: 0.4535

Example #3 At a school a random sample of 20 male and 16 females were asked to classify which political party they identified with. Democrat Republican Independent Male 11 7 2 Female 8 1 Are the proportions of Democrats, Republicans, and Independents the same within both populations? Conduct a test of significance at the α = 0.05 level. H: Ho: The proportions are the same among males and females and their political party HA: The proportions are different among males and females and their political party

Row total x Column total SRS (says) Row total x Column total table total Expected Counts  5 Democrat Republican Independent Male 11 7 2 Female 8 1 20 16 36 18 15 3 20 x 18 36 20 x 15 36 20 x 3 36 = 10 = 8.33 = 1.67 16 x 18 36 16 x 15 36 16 x 3 36 = 8 = 6.67 = 1.33 Not all are expected counts are  5, proceed with caution!

N: Chi-Square test for Homogeneity

T: Democrat Republican Independent Male 11 7 2 Female 8 1 Expected Male 10 8.33 1.67 Female 8 6.67 1.33 (O – E)2 E 2 =  = 0.855 (11 – 10)2 10 (7 – 8)2 8 (7 – 8.33)2 8.33 (8 – 6.67)2 6.67 (2 – 1.67)2 1.67 (1 – 1.33)2 1.33 + + + + +

P(2 > 0.855) = O: Degrees of Freedom: (r – 1)(c – 1) = (2 – 1)(3 – 1) = (1)(2) = 2

P(2 > 0.855) = P(2 > 0.855) = O: More than 0.25 Degrees of Freedom: (r – 1)(c – 1) = (2 – 1)(3 – 1) = (1)(2) = 2 OR: P(2 > 0.855) = 0.6521

M: P ___________  > 0.6521 0.05 Accept the Null

S: There is not enough evidence to claim the proportions are different among males and females and their political party

Ho: AP scores and AP test are independent. Example #4 The following chart represents the score distribution on the AP Exams for different subjects at a certain high school. Is there evidence that the score distribution is dependent from the subject? H: Ho: AP scores and AP test are independent. HA: AP scores and AP test are not independent.

Row total x Column total SRS (says) Expected Counts  5 34 42 44 18 12 52 68 30 150 Row total x Column total table total

34 42 44 18 12 52 68 30 150 34 x 52 150 34 x 68 150 34 x 30 150 = 11.787 = 15.413 = 6.8 42 x 52 150 42 x 68 150 42 x 30 150 = 14.56 = 19.04 = 8.4 44 x 52 150 44 x 68 150 44 x 30 150 = 15.253 = 19.947 = 8.8

34 42 44 18 12 52 68 30 150 18 x 52 150 18 x 68 150 18 x 30 150 = 6.24 = 8.16 = 3.6 12 x 52 150 12 x 68 150 12 x 30 150 = 4.16 = 5.44 = 2.4 Not all are expected counts are  5, proceed with caution!

N: Chi-Square test for Independence

T: Expected (O – E)2 E 2 =  = 5.227698 5 11.787 15.413 6.8 4 14.56 19.04 8.4 3 15.253 19.947 8.8 2 6.24 8.16 3.6 1 4.16 5.44 2.4 (O – E)2 E 2 =  = 5.227698

P(2 > 5.227698) = O: Degrees of Freedom: (r – 1)(c – 1) = (5 – 1)(3 – 1) = (4)(2) = 8

P(2 > 5.227698) = P(2 > 5.227698) = O: More than 0.25 Degrees of Freedom: (r – 1)(c – 1) = (5 – 1)(3 – 1) = (4)(2) = 8 OR: P(2 > 5.227698) = 0.732985

M: P ___________  > 0.732985 0.05 Accept the Null

S: There is not enough evidence to claim the AP scores and AP test are dependent