SlideShare a Scribd company logo
1 of 14
Think stats: chi square test
in digital analytics
Chi-Square Test for independence FTW!!11one
Pawel Kapuscinski
pawel@databall.co
@aliendeg
Chi-square test use cases
Is gender a factor in color preference of a car?
Comparing the number of sales from the test experience vs the control
experience (A/B test or A/B/n)
Comparing sales revenues of each product before and after the change in
strategy
Is country a factor in pricing plan preference?
Is weather a factor in sales of different products?
Implementing the chi square test
1. Identify the two variables of interest from the data table
2. State hypothesis
3. Compute Margin summations
4. Build contingency table
5. Compute the observed chi-square value
6. Compare the observed value to critical value
IMPORTANT: Requirements for chi squared test
The variables under study are each categorical. If sample data are displayed in a
Hypothesis testing steps
1. State null (H0) and alternative (H1) hypothesis
2. Choose level of significance
3. Find critical values
4. Find test statistic
5. Draw your conclusion
Chi squared distribution plots
Dataset - pricing plans sold across world
Sold plans
Professional Team Business Enterprise
USA 1220 790 500 190
UK 950 590 200 120
Germany 880 420 320 70
Sweden 340 260 130 60
Belgium 290 190 110 80
Poland 910 290 190 40
Spain 250 320 220 50
Hypothesis
H0: Number of sales of each pricing plan is independent upon country
H1: Number of sales of each pricing plan is dependent upon country
Finding test statistics (manually, Excel and R)
Find critical value
(https://www.ma.utexas.edu/users/davis/375/popecol/tables/chisq.html)
Compute Margin summations
Summing rows and columns
Build contingency table
Compute the observed chi-square value
Finding test statistics - results
R code
df = data.frame(Prof= c(152,118,110,42,36,113,31),
Team = c(98,73,52,32,23,36,40),
Business = c(62,25,40,16,13,23,27),
Enterprise = c(23,15,8,7,10,6,6))
chisq.test(df)
Drawing conclusion
We can reject hypothesis zero (H0) and
accept H1. Number of sales of each pricing
plan is dependent upon country
Learn more
http://stats.stackexchange.com
www.analyticsvidhya.com
www.dartistics.com
Measure Slack - http://join.measure.chat
Assignment / homework
Transactions
mobile desktop tablet
Direct 3490028 538101 526095
Paid Search 1229227 214050 210811
Organic Search 862144 401720 193064
Referral 228352 129927 39693
Affiliates 38669 31947 12523
Email 35681 14284 6615
Social 9013 5196 2070
Display 231 171 47
(Other) 58 82 36
Questions?

More Related Content

What's hot (8)

Indirect cost elcir
Indirect cost elcirIndirect cost elcir
Indirect cost elcir
 
Examplelf flowchart
Examplelf flowchartExamplelf flowchart
Examplelf flowchart
 
Excel - Vloopup, Averageif , Countif, Index and Sumif
Excel - Vloopup, Averageif , Countif, Index and SumifExcel - Vloopup, Averageif , Countif, Index and Sumif
Excel - Vloopup, Averageif , Countif, Index and Sumif
 
Financial modeling & coding
Financial modeling  & coding Financial modeling  & coding
Financial modeling & coding
 
5 creating a_histogram
5 creating a_histogram5 creating a_histogram
5 creating a_histogram
 
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.comBis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.com
 
[Question Paper] Visual Basic – 6 (Old Syllabus) [April / 2014]
[Question Paper] Visual Basic – 6 (Old Syllabus) [April / 2014][Question Paper] Visual Basic – 6 (Old Syllabus) [April / 2014]
[Question Paper] Visual Basic – 6 (Old Syllabus) [April / 2014]
 
Using line-based Voronoi cells in GIS
Using line-based Voronoi cells in GISUsing line-based Voronoi cells in GIS
Using line-based Voronoi cells in GIS
 

Viewers also liked

Viewers also liked (20)

You Don't Have to Be a Data Scientist to Do Data Science
You Don't Have to Be a Data Scientist to Do Data ScienceYou Don't Have to Be a Data Scientist to Do Data Science
You Don't Have to Be a Data Scientist to Do Data Science
 
Phils Session cards @ Measurecamp
Phils Session cards @ MeasurecampPhils Session cards @ Measurecamp
Phils Session cards @ Measurecamp
 
Plan a Digital Analytics Training Strategy for an Analytics Agency
Plan a Digital Analytics Training Strategy for an Analytics AgencyPlan a Digital Analytics Training Strategy for an Analytics Agency
Plan a Digital Analytics Training Strategy for an Analytics Agency
 
Morphing GA into an Affiliate Analytics Monster
Morphing GA into an Affiliate Analytics MonsterMorphing GA into an Affiliate Analytics Monster
Morphing GA into an Affiliate Analytics Monster
 
Top 10 Google Analytics tips to save you money!
Top 10 Google Analytics tips to save you money!Top 10 Google Analytics tips to save you money!
Top 10 Google Analytics tips to save you money!
 
Measurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement FrameworksMeasurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
 
4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeek4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeek
 
Measure camp pres 5 cro myths
Measure camp pres   5 cro mythsMeasure camp pres   5 cro myths
Measure camp pres 5 cro myths
 
User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)
 
Superweek 2015 traffic attribution
Superweek 2015 traffic attributionSuperweek 2015 traffic attribution
Superweek 2015 traffic attribution
 
Google Data Studio - First impressions @ Measurecamp
Google Data Studio - First impressions @ MeasurecampGoogle Data Studio - First impressions @ Measurecamp
Google Data Studio - First impressions @ Measurecamp
 
31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics Implementation31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics Implementation
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 
Brand Management Training Program
Brand Management Training ProgramBrand Management Training Program
Brand Management Training Program
 
SlideShare 101
SlideShare 101SlideShare 101
SlideShare 101
 
Web Analytics Project Brief: How to MOBILIZE and ENERGIZE your analytics team
Web Analytics Project Brief: How to MOBILIZE and ENERGIZE your analytics teamWeb Analytics Project Brief: How to MOBILIZE and ENERGIZE your analytics team
Web Analytics Project Brief: How to MOBILIZE and ENERGIZE your analytics team
 
Proactive Measures for Good Site Health - Brighton SEO 2014
Proactive Measures for Good Site Health - Brighton SEO 2014Proactive Measures for Good Site Health - Brighton SEO 2014
Proactive Measures for Good Site Health - Brighton SEO 2014
 
MeasureCamp London - Using enhanced ecommerce for non-ecommerce websites
MeasureCamp London - Using enhanced ecommerce for non-ecommerce websitesMeasureCamp London - Using enhanced ecommerce for non-ecommerce websites
MeasureCamp London - Using enhanced ecommerce for non-ecommerce websites
 
The Lego Data Layer
The Lego Data LayerThe Lego Data Layer
The Lego Data Layer
 
A study of digital data about yourself - By Phil Pearce
A study of digital data about yourself - By Phil PearceA study of digital data about yourself - By Phil Pearce
A study of digital data about yourself - By Phil Pearce
 

Similar to Chi squared test for digital analytics

6 product specifications (1)
6 product specifications (1)6 product specifications (1)
6 product specifications (1)
sadha sivam
 
6 product specifications
6 product specifications6 product specifications
6 product specifications
sadha sivam
 
Analyze phase lean six sigma tollgate template
Analyze phase   lean six sigma tollgate templateAnalyze phase   lean six sigma tollgate template
Analyze phase lean six sigma tollgate template
Steven Bonacorsi
 
Analyze Phase Lean Six Sigma Tollgate Templates
Analyze Phase Lean Six Sigma Tollgate TemplatesAnalyze Phase Lean Six Sigma Tollgate Templates
Analyze Phase Lean Six Sigma Tollgate Templates
Steven Bonacorsi
 
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docx
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docxConvenience shoppingSTAT-S301Fall 2019Question Set 1.docx
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docx
bobbywlane695641
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
melbruce90096
 
DEC215 Statistics .docx
DEC215 Statistics                                               .docxDEC215 Statistics                                               .docx
DEC215 Statistics .docx
randyburney60861
 
1. What is operations management Why is it important Is a good k.docx
1. What is operations management Why is it important Is a good k.docx1. What is operations management Why is it important Is a good k.docx
1. What is operations management Why is it important Is a good k.docx
jackiewalcutt
 

Similar to Chi squared test for digital analytics (20)

6 CVP anlysis NEW.pptx
6 CVP anlysis NEW.pptx6 CVP anlysis NEW.pptx
6 CVP anlysis NEW.pptx
 
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W2 Chi Square Test
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W2 Chi Square TestJavier Garcia - Verdugo Sanchez - Six Sigma Training - W2 Chi Square Test
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W2 Chi Square Test
 
Chap 5.ppt
Chap 5.pptChap 5.ppt
Chap 5.ppt
 
6 product specifications (1)
6 product specifications (1)6 product specifications (1)
6 product specifications (1)
 
6 product specifications
6 product specifications6 product specifications
6 product specifications
 
Analyze phase lean six sigma tollgate template
Analyze phase   lean six sigma tollgate templateAnalyze phase   lean six sigma tollgate template
Analyze phase lean six sigma tollgate template
 
Analyze Phase Lean Six Sigma Tollgate Templates
Analyze Phase Lean Six Sigma Tollgate TemplatesAnalyze Phase Lean Six Sigma Tollgate Templates
Analyze Phase Lean Six Sigma Tollgate Templates
 
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docx
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docxConvenience shoppingSTAT-S301Fall 2019Question Set 1.docx
Convenience shoppingSTAT-S301Fall 2019Question Set 1.docx
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
 
Bis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-newBis 345-final-exam-guide-set-1-new
Bis 345-final-exam-guide-set-1-new
 
Math 533 ( applied managerial statistics ) final exam answers
Math 533 ( applied managerial statistics ) final exam answersMath 533 ( applied managerial statistics ) final exam answers
Math 533 ( applied managerial statistics ) final exam answers
 
DEC215 Statistics .docx
DEC215 Statistics                                               .docxDEC215 Statistics                                               .docx
DEC215 Statistics .docx
 
Workshop: Your first machine learning project
Workshop: Your first machine learning projectWorkshop: Your first machine learning project
Workshop: Your first machine learning project
 
MATH 533 Education Specialist / snaptutorial.com
MATH 533 Education Specialist / snaptutorial.comMATH 533 Education Specialist / snaptutorial.com
MATH 533 Education Specialist / snaptutorial.com
 
ManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdfManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdf
 
1. What is operations management Why is it important Is a good k.docx
1. What is operations management Why is it important Is a good k.docx1. What is operations management Why is it important Is a good k.docx
1. What is operations management Why is it important Is a good k.docx
 
Math 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire courseMath 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire course
 
Math 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire courseMath 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire course
 
Math 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire courseMath 533 ( applied managerial statistics ) entire course
Math 533 ( applied managerial statistics ) entire course
 
MATH 533 RANK Achievement Education--math533rank.com
MATH 533 RANK Achievement Education--math533rank.comMATH 533 RANK Achievement Education--math533rank.com
MATH 533 RANK Achievement Education--math533rank.com
 

Recently uploaded

Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
HyderabadDolls
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 

Recently uploaded (20)

Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 

Chi squared test for digital analytics

  • 1. Think stats: chi square test in digital analytics Chi-Square Test for independence FTW!!11one Pawel Kapuscinski pawel@databall.co @aliendeg
  • 2. Chi-square test use cases Is gender a factor in color preference of a car? Comparing the number of sales from the test experience vs the control experience (A/B test or A/B/n) Comparing sales revenues of each product before and after the change in strategy Is country a factor in pricing plan preference? Is weather a factor in sales of different products?
  • 3. Implementing the chi square test 1. Identify the two variables of interest from the data table 2. State hypothesis 3. Compute Margin summations 4. Build contingency table 5. Compute the observed chi-square value 6. Compare the observed value to critical value IMPORTANT: Requirements for chi squared test The variables under study are each categorical. If sample data are displayed in a
  • 4. Hypothesis testing steps 1. State null (H0) and alternative (H1) hypothesis 2. Choose level of significance 3. Find critical values 4. Find test statistic 5. Draw your conclusion
  • 6. Dataset - pricing plans sold across world Sold plans Professional Team Business Enterprise USA 1220 790 500 190 UK 950 590 200 120 Germany 880 420 320 70 Sweden 340 260 130 60 Belgium 290 190 110 80 Poland 910 290 190 40 Spain 250 320 220 50
  • 7. Hypothesis H0: Number of sales of each pricing plan is independent upon country H1: Number of sales of each pricing plan is dependent upon country
  • 8. Finding test statistics (manually, Excel and R) Find critical value (https://www.ma.utexas.edu/users/davis/375/popecol/tables/chisq.html) Compute Margin summations Summing rows and columns Build contingency table Compute the observed chi-square value
  • 10. R code df = data.frame(Prof= c(152,118,110,42,36,113,31), Team = c(98,73,52,32,23,36,40), Business = c(62,25,40,16,13,23,27), Enterprise = c(23,15,8,7,10,6,6)) chisq.test(df)
  • 11. Drawing conclusion We can reject hypothesis zero (H0) and accept H1. Number of sales of each pricing plan is dependent upon country
  • 13. Assignment / homework Transactions mobile desktop tablet Direct 3490028 538101 526095 Paid Search 1229227 214050 210811 Organic Search 862144 401720 193064 Referral 228352 129927 39693 Affiliates 38669 31947 12523 Email 35681 14284 6615 Social 9013 5196 2070 Display 231 171 47 (Other) 58 82 36

Editor's Notes

  1. rejection region