You are on page 1of 7

Secti on: C

Muhammad Asad

QTRM
Zaheer
70074954
Question 1. Is the transportation mode used to ship goods independent of type of industry?
Suppose the following contingency table represents frequency counts of types of transportation
used by the publishing and the computer hardware industries. Analyze the data by using the chi-
square test of independence to determine whether type of industry is independent of
transportation mode. Let α = .05.

Solution:
We have to perform Chi-square test for independence.
Hypothesis:
H0: Type of industry is independent of transportation mode.
H1: Type of industry is dependent of transportation mode
Chi-square test statistic:

Where, O is observed frequencies.


E is Expected frequencies.

Where, Ri corresponds to the total sum of elements in row i


Cj corresponds to the total sum of elements in column j
N is the grand total
The row and column total have been calculated and they are shown below:
The table below shows the calculations to obtain the table with expected values:

Based on the observed and expected values, the squared distances can be computed
according to the following formula: (E−O)^2/E

So, test statistic is,

P-value :
Using Excel function, "=CHIDIST(   , df )"
we have,   = 6.432
df =(R - 1)( C - 1 ) = ( 2-1)( 3-1 ) = 1*2 = 2
So, p-value = CHIDIST (6.432, 2) = 0.0401
P-value = 0.0401
Decision about null hypothesis:
Decision rule:
1) Reject null hypothesis (H0) if p-value less than significance level α
2) Otherwise fail to reject null hypothesis.
Given, significance level =   = 0.05
It is observed that p-value (0.0401) is less than   = 0.05
So, Reject null hypothesis.
Conclusion:
There is not sufficient evidence to conclude that type of industry is independent of transportation
mode
Question 2. A group of 30-year-olds is interviewed to determine whether the type of music most
listened to by people in their age category is independent of the geographic location of their
residence. Use the chi-square test of independence, a = .01, and the following contingency table
to determine whether music preference is independent of geographic location.

Solution:
Sol:
Null hypothesis:
music preference is independent of geographic location
Alternative Hypothesis:
music preference is dependent of geographic location
alpha=0.01
Chi sq test of independence
Calculate Expected Frequencies
Expected Frequency=row tot*col tot/Grand total

ROCK B&B Country Classical Rowtoa

NE 140 32 5 18 195

S 134 41 52 8 235

W 154 27 8 13 202

Col Tot 428 100 65 39 632

E(140)=195*428/632=132.057
E(32)=195*100/632=30.854
E(5)=195*65/632=20.055
E(18)=195*39/632=12.033
E(134)=235*428/632=159.146
E(41)=235*100/632=37.184
E(52)=235*65/632=24.169
E(8)=235*39/632=14.502
E(154)=202*428/632=136.797
E(27)=202*100/632=31.962
E(8)=202*65/632=20.775
E(13)=202*39/632=12.465
Create chi sq. table:
O E O-E (0-E) ^2 (O-E) ^2/E

140 132.057 7.943 63.09125 0.477758

32 30.854 1.146 1.313316 0.042566

5 20.055 -15.055 226.653 11.30157

18 12.033 5.967 35.60509 2.958954

134 159.146 -25.146 632.3213 3.973215

41 37.184 3.816 14.56186 0.391616

52 24.169 27.831 774.5646 32.04785

8 14.502 -6.502 42.276 2.915184

154 136.797 17.203 295.9432 2.163375

27 31.962 -4.962 24.62144 0.770335

8 20.775 -12.775 163.2006 7.855626

13 12.465 0.535 0.286225 0.022962

CHITESTST
STATISTIC 64.92102

p value<0.00001
Reject Null hypothesis.
Accept alternative Hypothesis.
There is no sufficient statistical evidence at 1% level of significance to conclude that music
preference is independent of geographic location.
music preference is dependent of geographic location.
Degrees of freedom= (no of rows-1) (no of columns-1)
= (3-1) (4-1)
= 2*3
=6

You might also like