SlideShare a Scribd company logo
1 of 35
DATA ANALYSIS 
30 OCTOBER 2014
THEORY, PROPOSITIONS, LOGIC
 Hypotheses are“tested” 
 Hypotheses are never“proved” 
 Hypotheses only are“rejected” 
 Theories are built and verified by testing hypotheses
Truth 
Ho true Ho false 
Decision 
Fail to 
reject Ho 
Reject Ho
Error 
Error 
Truth 
Ho true Ho false 
Decision 
Fail to 
reject Ho 
Reject Ho
Type 1 
error 
Type 2 
error 
Truth 
Ho true Ho false 
Decision 
Fail to 
reject Ho 
Reject Ho
TRADITIONALLY, 
probability of Type 1 
error set at .05 
Minimize Type 2 
error by 
increasing 
sample size 
Truth 
Ho true Ho false 
Decision 
Fail to 
reject Ho 
Reject Ho
Also known as CROSSTABULATIONS
 A contingency table is a table of counts. 
 A two-dimensional contingency table is 
formed by classifying subjects by two 
variables. 
 One variable identifies the row categories; 
the other variable defines the column 
categories. 
 The combinations of row and column 
categories are called cells.
Column 1 Column 2 
R1; C1 R1; C2 
R2; C1 R2; C2 
Row 2 Row 1 
R1 
tot 
R2 
tot 
C1 tot C2 tot Total
Male Female 
R1; C1 R1; C2 
R2; C1 R2; C2 
Row 2 Row 1 
R1 
total 
R2 
total 
C1 total C2 total Total
Male Female 
R1; C1 R1; C2 
R2; C1 R2; C2 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
R1 
total 
R2 
total 
C1 total C2 total Total
Male Female 
Males not in 
poverty 
Females not in 
poverty 
Males in poverty 
Females in 
poverty 
R1 
total 
R2 
total 
C1 total C2 total Total 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty
Male Female 
Males not in 
poverty 
Females not in 
poverty 
Males in poverty 
Females in 
poverty 
No 
pov 
total 
Pov 
total 
Male total Female total Total 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty
Male Female 
Males not in 
poverty 
Females not in 
poverty 
Males in poverty 
Females in 
poverty 
No 
pov 
total 
Pov 
total 
Male total Female total Total 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
Marginals => 
<= Marginals
R script: 
Console output:
Male Female 
3,086 3,039 
443 623 
Male total Female total Total 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
No 
pov 
total 
Pov 
total
R script: 
Console output:
Male Female 
3,086 3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066
Male Female 
3,086 3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
Is gender independent of household poverty status?
Male Female 
3,086 3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
If you know a person’s gender, can you predict poverty status?
If you know a person’s poverty status, can you predict gender? 
Male Female 
3,086 3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066
Male Female 
3,086 3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
A cell value should be equal to (row total x column total) ÷ total
Male Female 
3,086 
Expected value 
is 3006 
3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
E.g., (6125 x 3529) ÷ 7191 should be equal to 3086, but is 3006
Male Female 
3,086 
Expected value 
is 3006 
3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
An expected cell count is a hypothetical count that would occur 
if there is no relationship between the two variables
Male Female 
3,086 
Expected value 
is 3006 
3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
A  value is the sum of the squared deviations of observed 
minus expected divided by the expected value
Male Female 
3,086 
Expected value 
is 3006 
3,039 
443 623 
3,529 3,662 7,191 
2005 Household 
Not in Poverty 
2005 Household 
In Poverty 
6,125 
1,066 
A  value is the sum of the squared deviations of observed 
minus expected divided by the expected value
 Null hypothesis is H0: R x C = 0 
 Alternate hypothesis is H1: R x C ≠ 0 
 a = .05 Described as a test 
of independence
R script: 
Console output:
R script: 
Console output: 
Degrees of freedom (df) = (# rows 
– 1)(# columns – 1)
R script: 
Console output: 
p-value < .05, so reject null
 A test of the hypothesis that rows and 
columns in a table are independent 
 In our case, a test of the independence of 
gender and poverty status reveals 
• Household poverty status and gender are not 
independent 
• Knowing household poverty status helps predict 
gender
 A test of the hypothesis that rows and 
columns in a table are independent 
 In our case, a test of the independence of 
gender and poverty status reveals 
• Household poverty status and gender are not 
independent 
But how much? 
• Knowing household poverty status helps predict 
gender
DATA ANALYSIS 
30 OCTOBER 2014

More Related Content

Viewers also liked

Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programminggourab27
 
Nonlinear programming 2013
Nonlinear programming 2013Nonlinear programming 2013
Nonlinear programming 2013sharifz
 
Simplex method Big M infeasible
Simplex method Big M infeasibleSimplex method Big M infeasible
Simplex method Big M infeasibleIzzati Hamid
 
Duality in Linear Programming Problem
Duality in Linear Programming ProblemDuality in Linear Programming Problem
Duality in Linear Programming ProblemRAVI PRASAD K.J.
 
Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)Upama Dwivedi
 
Integer Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingInteger Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingSalah A. Skaik - MBA-PMP®
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed testsHasnain Baber
 
Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleAhmadullah
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programmingjyothimonc
 
Chi square test final
Chi square test finalChi square test final
Chi square test finalHar Jindal
 

Viewers also liked (20)

Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Artificial variable technique big m method (1)
Artificial variable technique big m method (1)Artificial variable technique big m method (1)
Artificial variable technique big m method (1)
 
Chi Squared Test
Chi Squared TestChi Squared Test
Chi Squared Test
 
Nonlinear programming 2013
Nonlinear programming 2013Nonlinear programming 2013
Nonlinear programming 2013
 
Dual simplexmethod
Dual simplexmethodDual simplexmethod
Dual simplexmethod
 
Simplex method Big M infeasible
Simplex method Big M infeasibleSimplex method Big M infeasible
Simplex method Big M infeasible
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Duality in Linear Programming Problem
Duality in Linear Programming ProblemDuality in Linear Programming Problem
Duality in Linear Programming Problem
 
Probability
ProbabilityProbability
Probability
 
Chi squared test
Chi squared testChi squared test
Chi squared test
 
Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)Brm (one tailed and two tailed hypothesis)
Brm (one tailed and two tailed hypothesis)
 
Integer Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingInteger Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear Programming
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed tests
 
Descriptive statistics
Descriptive statisticsDescriptive statistics
Descriptive statistics
 
Bayes Theorem
Bayes TheoremBayes Theorem
Bayes Theorem
 
Chi square analysis
Chi square analysisChi square analysis
Chi square analysis
 
Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two Sample
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Chi square test final
Chi square test finalChi square test final
Chi square test final
 

More from Penn State University

Artificial Intelligence and the Future of Work
Artificial Intelligence and the Future of WorkArtificial Intelligence and the Future of Work
Artificial Intelligence and the Future of WorkPenn State University
 
Validity of conclusions, internal validity, and external validity; research d...
Validity of conclusions, internal validity, and external validity; research d...Validity of conclusions, internal validity, and external validity; research d...
Validity of conclusions, internal validity, and external validity; research d...Penn State University
 
Validity of Conclusions & Generalizations
Validity of Conclusions & GeneralizationsValidity of Conclusions & Generalizations
Validity of Conclusions & GeneralizationsPenn State University
 
Sharing Science: Tools for Improving our Research, Teaching, and Impact
Sharing Science: Tools for Improving our Research, Teaching, and ImpactSharing Science: Tools for Improving our Research, Teaching, and Impact
Sharing Science: Tools for Improving our Research, Teaching, and ImpactPenn State University
 
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the course
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the courseWF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the course
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the coursePenn State University
 
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017Class Meeting 12 -- WF ED 540 -- Fall Semester 2017
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017Penn State University
 
WF ED 540 - Class Meeting 7 - Fall Semester 2017
WF ED 540 - Class Meeting 7 - Fall Semester 2017WF ED 540 - Class Meeting 7 - Fall Semester 2017
WF ED 540 - Class Meeting 7 - Fall Semester 2017Penn State University
 
WF ED 540, Class Meeting 5, Fall Semester 2017
WF ED 540, Class Meeting 5, Fall Semester 2017WF ED 540, Class Meeting 5, Fall Semester 2017
WF ED 540, Class Meeting 5, Fall Semester 2017Penn State University
 
WF ED 540 - Class Meeting 3 - Fall Semester 2017
WF ED 540 - Class Meeting 3 - Fall Semester 2017WF ED 540 - Class Meeting 3 - Fall Semester 2017
WF ED 540 - Class Meeting 3 - Fall Semester 2017Penn State University
 
R syntax, including procedures for communicating data
R syntax, including procedures for communicating dataR syntax, including procedures for communicating data
R syntax, including procedures for communicating dataPenn State University
 
Introduction to WF ED 540, Data Analysis, Fall 2017
Introduction to WF ED 540, Data Analysis, Fall 2017Introduction to WF ED 540, Data Analysis, Fall 2017
Introduction to WF ED 540, Data Analysis, Fall 2017Penn State University
 
Bob Game - Photos for a Celebration of Life
Bob Game - Photos for a Celebration of LifeBob Game - Photos for a Celebration of Life
Bob Game - Photos for a Celebration of LifePenn State University
 
In Preparation for 5 April UCWHRE Meeting
In Preparation for 5 April UCWHRE MeetingIn Preparation for 5 April UCWHRE Meeting
In Preparation for 5 April UCWHRE MeetingPenn State University
 
Structural Model of Topics in Academy of Human Resource Development Journals,...
Structural Model of Topics in Academy of Human Resource Development Journals,...Structural Model of Topics in Academy of Human Resource Development Journals,...
Structural Model of Topics in Academy of Human Resource Development Journals,...Penn State University
 

More from Penn State University (20)

Artificial Intelligence and the Future of Work
Artificial Intelligence and the Future of WorkArtificial Intelligence and the Future of Work
Artificial Intelligence and the Future of Work
 
Research Design
Research DesignResearch Design
Research Design
 
Validity of conclusions, internal validity, and external validity; research d...
Validity of conclusions, internal validity, and external validity; research d...Validity of conclusions, internal validity, and external validity; research d...
Validity of conclusions, internal validity, and external validity; research d...
 
Validity of Conclusions & Generalizations
Validity of Conclusions & GeneralizationsValidity of Conclusions & Generalizations
Validity of Conclusions & Generalizations
 
Evidence
EvidenceEvidence
Evidence
 
Research Design
Research DesignResearch Design
Research Design
 
WF ED 540 Hypothesis Testing - 2018
WF ED 540 Hypothesis Testing - 2018WF ED 540 Hypothesis Testing - 2018
WF ED 540 Hypothesis Testing - 2018
 
Some Research Concepts
Some Research ConceptsSome Research Concepts
Some Research Concepts
 
Sharing Science: Tools for Improving our Research, Teaching, and Impact
Sharing Science: Tools for Improving our Research, Teaching, and ImpactSharing Science: Tools for Improving our Research, Teaching, and Impact
Sharing Science: Tools for Improving our Research, Teaching, and Impact
 
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the course
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the courseWF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the course
WF ED 540, Fall Semester 2018, Class Meeting 1 - Intro to the course
 
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017Class Meeting 12 -- WF ED 540 -- Fall Semester 2017
Class Meeting 12 -- WF ED 540 -- Fall Semester 2017
 
WF ED 540 - Class Meeting 7 - Fall Semester 2017
WF ED 540 - Class Meeting 7 - Fall Semester 2017WF ED 540 - Class Meeting 7 - Fall Semester 2017
WF ED 540 - Class Meeting 7 - Fall Semester 2017
 
WF ED 540, Class Meeting 5, Fall Semester 2017
WF ED 540, Class Meeting 5, Fall Semester 2017WF ED 540, Class Meeting 5, Fall Semester 2017
WF ED 540, Class Meeting 5, Fall Semester 2017
 
WF ED 540, Data Analysis, Fall 2017
WF ED 540, Data Analysis, Fall 2017WF ED 540, Data Analysis, Fall 2017
WF ED 540, Data Analysis, Fall 2017
 
WF ED 540 - Class Meeting 3 - Fall Semester 2017
WF ED 540 - Class Meeting 3 - Fall Semester 2017WF ED 540 - Class Meeting 3 - Fall Semester 2017
WF ED 540 - Class Meeting 3 - Fall Semester 2017
 
R syntax, including procedures for communicating data
R syntax, including procedures for communicating dataR syntax, including procedures for communicating data
R syntax, including procedures for communicating data
 
Introduction to WF ED 540, Data Analysis, Fall 2017
Introduction to WF ED 540, Data Analysis, Fall 2017Introduction to WF ED 540, Data Analysis, Fall 2017
Introduction to WF ED 540, Data Analysis, Fall 2017
 
Bob Game - Photos for a Celebration of Life
Bob Game - Photos for a Celebration of LifeBob Game - Photos for a Celebration of Life
Bob Game - Photos for a Celebration of Life
 
In Preparation for 5 April UCWHRE Meeting
In Preparation for 5 April UCWHRE MeetingIn Preparation for 5 April UCWHRE Meeting
In Preparation for 5 April UCWHRE Meeting
 
Structural Model of Topics in Academy of Human Resource Development Journals,...
Structural Model of Topics in Academy of Human Resource Development Journals,...Structural Model of Topics in Academy of Human Resource Development Journals,...
Structural Model of Topics in Academy of Human Resource Development Journals,...
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

Contingency tables in R, 2014

  • 1. DATA ANALYSIS 30 OCTOBER 2014
  • 3.  Hypotheses are“tested”  Hypotheses are never“proved”  Hypotheses only are“rejected”  Theories are built and verified by testing hypotheses
  • 4. Truth Ho true Ho false Decision Fail to reject Ho Reject Ho
  • 5. Error Error Truth Ho true Ho false Decision Fail to reject Ho Reject Ho
  • 6. Type 1 error Type 2 error Truth Ho true Ho false Decision Fail to reject Ho Reject Ho
  • 7. TRADITIONALLY, probability of Type 1 error set at .05 Minimize Type 2 error by increasing sample size Truth Ho true Ho false Decision Fail to reject Ho Reject Ho
  • 8. Also known as CROSSTABULATIONS
  • 9.  A contingency table is a table of counts.  A two-dimensional contingency table is formed by classifying subjects by two variables.  One variable identifies the row categories; the other variable defines the column categories.  The combinations of row and column categories are called cells.
  • 10. Column 1 Column 2 R1; C1 R1; C2 R2; C1 R2; C2 Row 2 Row 1 R1 tot R2 tot C1 tot C2 tot Total
  • 11.
  • 12. Male Female R1; C1 R1; C2 R2; C1 R2; C2 Row 2 Row 1 R1 total R2 total C1 total C2 total Total
  • 13. Male Female R1; C1 R1; C2 R2; C1 R2; C2 2005 Household Not in Poverty 2005 Household In Poverty R1 total R2 total C1 total C2 total Total
  • 14. Male Female Males not in poverty Females not in poverty Males in poverty Females in poverty R1 total R2 total C1 total C2 total Total 2005 Household Not in Poverty 2005 Household In Poverty
  • 15. Male Female Males not in poverty Females not in poverty Males in poverty Females in poverty No pov total Pov total Male total Female total Total 2005 Household Not in Poverty 2005 Household In Poverty
  • 16. Male Female Males not in poverty Females not in poverty Males in poverty Females in poverty No pov total Pov total Male total Female total Total 2005 Household Not in Poverty 2005 Household In Poverty Marginals => <= Marginals
  • 17. R script: Console output:
  • 18. Male Female 3,086 3,039 443 623 Male total Female total Total 2005 Household Not in Poverty 2005 Household In Poverty No pov total Pov total
  • 19. R script: Console output:
  • 20. Male Female 3,086 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066
  • 21. Male Female 3,086 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 Is gender independent of household poverty status?
  • 22. Male Female 3,086 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 If you know a person’s gender, can you predict poverty status?
  • 23. If you know a person’s poverty status, can you predict gender? Male Female 3,086 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066
  • 24. Male Female 3,086 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 A cell value should be equal to (row total x column total) ÷ total
  • 25. Male Female 3,086 Expected value is 3006 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 E.g., (6125 x 3529) ÷ 7191 should be equal to 3086, but is 3006
  • 26. Male Female 3,086 Expected value is 3006 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 An expected cell count is a hypothetical count that would occur if there is no relationship between the two variables
  • 27. Male Female 3,086 Expected value is 3006 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 A  value is the sum of the squared deviations of observed minus expected divided by the expected value
  • 28. Male Female 3,086 Expected value is 3006 3,039 443 623 3,529 3,662 7,191 2005 Household Not in Poverty 2005 Household In Poverty 6,125 1,066 A  value is the sum of the squared deviations of observed minus expected divided by the expected value
  • 29.  Null hypothesis is H0: R x C = 0  Alternate hypothesis is H1: R x C ≠ 0  a = .05 Described as a test of independence
  • 30. R script: Console output:
  • 31. R script: Console output: Degrees of freedom (df) = (# rows – 1)(# columns – 1)
  • 32. R script: Console output: p-value < .05, so reject null
  • 33.  A test of the hypothesis that rows and columns in a table are independent  In our case, a test of the independence of gender and poverty status reveals • Household poverty status and gender are not independent • Knowing household poverty status helps predict gender
  • 34.  A test of the hypothesis that rows and columns in a table are independent  In our case, a test of the independence of gender and poverty status reveals • Household poverty status and gender are not independent But how much? • Knowing household poverty status helps predict gender
  • 35. DATA ANALYSIS 30 OCTOBER 2014