1 of 56

APPLICATIONS

OF

CHI - SQUARE DISTRIBUTION

Prepared by -

Karnaraj Rathod

Kushal Pasumarthy

Rohan Wadikar

Aliasger Karachiwala

Guided by -

Sagar N Sankeshwari

2 of 56

Table of Contents

Introduction to chi-square distribution

  • Chi-square distribution and its characteristics
  • Applications
  • Assumptions
  • Test procedure for chi-square test
    1. Goodness of fit 2.Independence of attributes

Overview of our project

  • Project details
  • Project timeline

3 of 56

Table of Contents

Analysis of data

  • Independence of attributes
  • Goodness of fit

Limitations and challenges Scope of further study Acknowledgement

4 of 56

Introduction

Part 01

5 of 56

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.

6 of 56

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,

7 of 56

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:

8 of 56

Applications of chi-square distribution

  • Chi-square test for goodness of fit

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.

​

  • Chi-square test for independence

The Chi-square test of independence determines whether there is a statistically significant association between two categorical variables.

9 of 56

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.

10 of 56

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.

11 of 56

Critical region and Conclusion

At α level of significance, the critical value is

Reject the null hypothesis if, Or reject the null hypothesis if,

tab

12 of 56

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.

13 of 56

Critical Region and Conclusion

At α level of significance, the critical value is

Reject the null hypothesis if, Or reject the null hypothesis if,

tab

14 of 56

To illustrate the above mentioned applications, we undertook a team project.

PROJECT TITLE

TECH IN LOCK-DOWN

15 of 56

Project details

Part 02

16 of 56

Overview of our project

Objective

- " To capture your mode of entertainment via technology in the wake of covid’19 outbreak "

Domain

17 of 56

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

18 of 56

Data Collected

  • Before Cleaning

​

https://docs.google.com/spreadsheets/d/1fYY01yhd4v_ulWVlpkvixtOCQQ5RmBUZ/edit?usp=sharing&ouid=117536046545803041041&rtpof=true&sd=true

  • After Cleaning

19 of 56

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

20 of 56

Analysis

Part 03

08

21 of 56

Chi-square test for independence

  • Analysis 1: OTT Platforms

​

  • Case 1: OTT platform vs Occupation of the respondent

​

  • Case 2: OTT platform vs Gender of the respondent

​

  • Case 3: OTT platform vs Age of the respondent

22 of 56

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

23 of 56

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)

24 of 56

R Output obtained -

25 of 56

Contingency table -

Table 1.1: Association between OTT platform and occupation of the respondent

26 of 56

Clustered bar chart -

27 of 56

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,

28 of 56

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

​

29 of 56

Chi-square test for independence

  • Analysis 2: Gaming

​

  • Case 1: PUBG Players vs Age of the respondent

​

  • Case 2: PUBG Players vs Gender of the respondent

​

  • Case 3: PUBG Players vs Occupation of the respondent

30 of 56

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

31 of 56

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))

32 of 56

R Output obtained -

33 of 56

Contingency table -

Table 1.2: Association between PUBG players and age of the respondent

34 of 56

Clustered bar chart -

35 of 56

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,

36 of 56

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

37 of 56

Chi-square test for independence

  • Analysis 3: Social Media

​

  • Case 1: Instagram Users vs Occupation of the respondent

​

  • Case 2: Instagram Users vs Gender of the respondent

​

  • Case 3: Instagram Users vs Age of the respondent

38 of 56

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

39 of 56

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))

40 of 56

R Output obtained -

41 of 56

Contingency table -

Table 1.3: Association between Instagram users and occupation of the respondent

42 of 56

Clustered bar chart -

43 of 56

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,

44 of 56

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

45 of 56

Chi-square test for goodness of fit

  • Analysis 4: Video Call Applications

​

  • Case: Various online applications used for video calling

46 of 56

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

47 of 56

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)

48 of 56

R output obtained -

49 of 56

Frequency table -

Table 2.0: Frequency distribution of usage of video call applications

50 of 56

Bar chart -

51 of 56

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

52 of 56

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

53 of 56

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.

54 of 56

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

55 of 56

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

56 of 56

THANK YOU FOR WATCHING!