APPLICATIONS
OF
CHI - SQUARE DISTRIBUTION
Prepared by -
Karnaraj Rathod
Kushal Pasumarthy
Rohan Wadikar
Aliasger Karachiwala
Guided by -
Sagar N Sankeshwari
Table of Contents
Introduction to chi-square distribution
Overview of our project
Table of Contents
Analysis of data
Limitations and challenges Scope of further study Acknowledgement
Introduction
Part 01
Chi-square distribution
Karl Pearson in 1990, developed a test known as χ2-test to test if the deviation between observation (experiment) and theory may be attributed to chance (fluctuations of sampling) or if it is really due to the inadequacy of the theory to fit the observed data.
The probability density function (pdf) of the chi-square distribution with k degrees of freedom is,
where k is a positive integer denoting degrees of freedom
= Gamma function
otherwise
The probability density curve can be given as,
Characteristics of chi-square distribution with k degrees of freedom
Mode: max (k - 2, 0) Variance: 2k
Skewness:
Kurtosis:
POINTS
TO
REMEMBER
Cumulative distribution function:
Moment generating function: Mean: k
Median:
Applications of chi-square distribution
Chi-Square goodness of fit test is a non-parametric test that is used to find out how the observed value of a given phenomena is significantly different from the expected value.
The Chi-square test of independence determines whether there is a statistically significant association between two categorical variables.
Assumptions for applying chi-square test
The data is randomly drawn from a population
The values in the cells are considered adequate when expected counts are not less than 5 and there are no cells with zero count
The sample size is sufficiently large. The application of the chi-square test to a smaller sample could lead to type II error (i.e., accepting the null hypothesis when it is actually false).
The variables under consideration must be mutually exclusive (independent). It means that each variable must only be counted once in a particular category and should not be allowed to appear in other categories.
Test procedure for chi-square test for goodness of fit
Test statistic
The test statistic is given by,
Null and Alternative hypothesis
Theoretical frequency distribution is a good fit to the observed frequency
distribution
Theoretical frequency distribution is not a good fit to the observed frequency distribution
Vs
distribution with (n - 1) degrees of freedom
in which ,fo = experimented frequency of the observed facts
,fe = expected frequency of occurrence on null hypothesis.
Critical region and Conclusion
At α level of significance, the critical value is
Reject the null hypothesis if, Or reject the null hypothesis if,
tab
Test procedure for chi-square test for independence
Test statistic
The test statistic is given by,
The two attributes are dependent on each other
Null and Alternative hypothesis
The two attributes are independent of each other
Vs
distribution with (r-1)(c-1) degrees of freedom
where r = the number of rows and c = number of columns
also, fo = experimented frequency of the observed facts
fe = expected frequency of occurrence on null hypothesis.
Critical Region and Conclusion
At α level of significance, the critical value is
Reject the null hypothesis if, Or reject the null hypothesis if,
tab
To illustrate the above mentioned applications, we undertook a team project.
PROJECT TITLE
TECH IN LOCK-DOWN
Project details
Part 02
Overview of our project
Objective
- " To capture your mode of entertainment via technology in the wake of covid’19 outbreak "
Domain
Overview of our project
Methodology
Data collection method - Primary data collected through an online questionnaire
as Network sampling technique
Tests used - Chi-square test for goodness of fit Chi-square test for independence
Sample description - Target group, respondents’ age ranging from 10 – 55
300+ responses from various parts of India
Data Collected
Project Timeline
01
Phase 01 Deciding on the broader question
02
Phase 02 Working out the confined domains and sub-domains
04
Phase 04 Constructing the questionnaire and collecting data
03
Phase 03 Having clarity on the objective of the study
05
Phase 05 Analysis of data and Presentation preparation
23rd July 2021
1st August 2021
25th August 2021
18th September 2021
9th October 2021
Analysis
Part 03
08
Chi-square test for independence
Chi-square test for independence
Variables taken -
Type of OTT platform (i.e. Netflix, Amazon prime etc) and Occupation of the respondent
Null and Alternative hypothesis
The choice of OTT platform and occupation are independent of each other
Vs
The choice of OTT platform and occupation are dependent on each other
R program -
Tech_OTT<-read.csv("C:\\Users\\Rohan\\Downloads\\Tech_OTT.csv")
Tech_OTT
head(Tech_OTT)
str(Tech_OTT)
library(gmodels)
Tech_Table1<-CrossTable(Tech_OTT$OTT.Platforms,Tech_OTT$ï..Occupation,chisq= TRUE,expected =TRUE,prop.r = FALSE,prop.c = FALSE,prop.t = F,prop.chisq = F )
Tech_Count<-Tech_Table1$t
Tech_Count
barplot(Tech_Count,beside=T,col=c("Turquoise","Cadetblue","Cornflowerblue","Darkblue"),ylab="Frequency",xlab="Occupation",legend=T)
R Output obtained -
Contingency table -
Table 1.1: Association between OTT platform and occupation of the respondent
Clustered bar chart -
Critical value and conclusion -
Under
The obtained p value= 0.0253087 at 5% level of significance Since, p value < 0.05, we reject the null hypothesis
i.e. the choice of OTT platform and occupation of the respondent are dependent on each other
, the obtained value = 14.42 at 5% level of significance
=
Here the critical value is, = 12.592
we reject the null hypothesis
Since, value >
Also,
Test with other socio-demographical variables -
OTT
platform
Gender
Not Associated
P V A L U E = 0.381
P V A L U E = 0 . 059
OTT
platform
Age
Not Associated
Chi-square test for independence
Chi-square test for independence
Variables taken -
PUBG players and age of the respondent
Null and Alternative hypothesis
The choice to play PUBG and age are independent of each other
Vs
The choice to play PUBG and age are dependent on each other
R program -
Tech_Gaming<-read.csv("C:\\Users\\Rohan\\Downloads\\Gaming_Age.csv")
Tech_Gaming
table(Tech_Gaming$PUBG.Players)
head(Tech_Gaming)
str(Tech_Gaming)
library(gmodels)
Tech_Table4<-CrossTable(Tech_Gaming$PUBG.Players,Tech_Gaming$ï..Age,chisq = TRUE,expected = TRUE,prop.r = FALSE,prop.c = FALSE,prop.t = F,prop.chisq = F )
Tech_Count<-Tech_Table4$t
Tech_Count
barplot(Tech_Count,beside=T,col=c("Maroon","Yellow"),ylab="Frequency",xlab="Age",legend=T,width = 15, xlim = c(0,120))
R Output obtained -
Contingency table -
Table 1.2: Association between PUBG players and age of the respondent
Clustered bar chart -
Critical value and conclusion -
The obtained p value = 0.00216 at 5% level of significance Since, p value < 0.05, we reject the null hypothesis
i.e. the choice to play PUBG and age of the respondent are dependent on each other
Under
,the obtained value = 9.412 at 5% level of significance
=
Here the critical value is, = 3.841
we reject the null hypothesis
Since, value >
Also,
Associated
Test with other socio-demographical variables -
PUBG
player
P V A L U E = 0.000074
Gender
Not Associated
P V A L U E = 0.674
PUBG
player
Occupation
Chi-square test for independence
Chi-square test for independence
Variables taken -
Instagram users and occupation of the respondent
Null and Alternative hypothesis
The usage of Instagram and occupation are independent of each other
Vs
The usage of Instagram and occupation are dependent on each other
R program -
Insta_Occupation<-read.csv("C:\\Users\\Rohan\\Downloads\\Insta_Occupation.csv")
Insta_Occupation
head(Insta_Occupation)
str(Insta_Occupation)
library(gmodels)
Tech_Table7<-CrossTable(Insta_Occupation$Instagram.User,Insta_Occupation$ï..Occupation,chisq = TRUE,expected = TRUE,prop.r = FALSE,prop.c = FALSE,prop.t = F,prop.chisq = F )
Tech_Count<-Tech_Table7$t
Tech_Count
barplot(Tech_Count,beside=T,col=c("#FFFF66","#FF66CC"),ylab="Frequency",
xlab=“Occupation",legend=T,width = 10, xlim = c(0,120))
R Output obtained -
Contingency table -
Table 1.3: Association between Instagram users and occupation of the respondent
Clustered bar chart -
Critical value and conclusion -
Under
=
The obtained p value = 0.0898 at 5% level of significance Since, p value > 0.05, we accept the null hypothesis
i.e. The choice to use Instagram and occupation of the respondent are independent of each other
, the obtained value = 4.821 at 5% level of significance
Here the critical value is, = 5.991
we accept the null hypothesis
Since, value <
Also,
Not Associated
Test with other socio-demographical variables -
P V A L U E = 0.132
Instagram user
Gender
Associated
P V A L U E = 0.005
Instagram user
Age
Chi-square test for goodness of fit
Chi-square test for goodness of fit
Variables taken -
Various online applications used for video calling
Null and Alternative hypothesis
The usage of video call application is equally distributed in the data
Vs
The usage of video call application is not equally distributed in the data
R program -
Vcall<-c(179,51,97,231)
names(Vcall)<-c("Google Meet","Facetime","Zoom","Social Media Apps")
Vcall
Vcall/sum(Vcall)
Probability<-c(0.25,0.25,0.25,0.25)
#Ho:Proportion of usage of applications for video calls is 0.25
#Ha:Proportion of usage of applications for video calls is not same
chisq.test(Vcall,p=Probability)
R output obtained -
Frequency table -
Table 2.0: Frequency distribution of usage of video call applications
Bar chart -
Critical value and conclusion -
Under
The obtained p value = 0.00000000000000022 at 5% level of significance Since, p value < 0.05, we reject the null hypothesis
, the obtained value = 140.29 at 5% level of significance
we reject the null hypothesis
=
= 7.815
Here the critical value is,
Since, value > Also,
i.e The usage of video call application is not equally distributed in the data
Limitations and challenges
The target for the number of responses being 400, was not achieved
Analysis was entirely based on the number and kind of responses we receive
As the project was time bound, we faced time constraints
Questionnaire was accessible to only those who had internet connection
Scope of further study
On account of the pandemic and also it's consequences, technology in it's various forms has influenced the lives of human beings of all age groups.
It is thus evident that technology has played a vital role not only in entertainment but also in the health regime and to enhance our abilities in various fields of interest as well.
Credentials
Name: Karnaraj Rathod
Roll No.: S046
Mobile No.: 6354544661
Name: Rohan Wadikar
Roll No.: S055
Mobile No.: 8007772771
Name: Aliasger Karachiwala
Roll No.: S056
Mobile No.: 9833840133
Name: Kushal Pasumarthy
Roll No.: S063
Mobile No.: 9740398747
Acknowledgement
Technology has had a deep impact during this socially-distanced pandemic. By this study we were able to see that how it has been incorporated in the lives of different people. According to their needs each person used different aspects of technology. This shows that as a population, we humans are responsibly using it. What only remains is for us to make sure that techonology is responsible with us too from this note I want to end the project by
expressing our special thanks of gratitude to
Prof. Sagar N. Sankeshwari and Dr. Hemant Kulkarni for their able guidance and support
We also referred Fundamentals of Statistics by S.C Gupta for thisproject
THANK YOU FOR WATCHING!