3
$\begingroup$

So I am supposed to do a study about the online learning obstacles. now the research question is as stated as follows:"Is there an association between the work status of the college students and the challenges facing them? in other words, Are the two categorical variables in this case dependent?". I have 2 questions the first one is related to work status with 3 options( full time-worker. part time worker, no work) and the second one is the obstacles with 4 options ( Electricity, Environmental Distraction, job responsibilities and technical issues). So i did the survey and sent it to 50 participants as requested. the data is categorical so i need to use chi square in order to check for the association however when i tabulated the results as in the attachment below,enter image description here

So when I obviously I cannot use the chi square test because there are many cells with expected frequencies less than 5. thus I cannot use the chi square and i was not allowed to increase the number of responses so I would get higher expected values .( N=50 is allowed only)

Therefore what test shall I do and how? Additionally it was stated that "Collecting numeric data and limiting the amount of data makes analysis at this level easier. Your hypothesis has a direct result on what kinds of data will be collected. We can only analyze data that can be summarized with either a mean or a proportion" what does that mean and what hypothesis shall I put. thank you in advance and I am sorry for the many questions but I am still at the entry level of statistics.

$\endgroup$
1
  • $\begingroup$ See Frank's answer here. If you apply a correction to the test statistic, you can perform a chi-square test which has accurate p values eben when the expected cells are below 5. $\endgroup$ Commented Jan 26, 2021 at 19:14

4 Answers 4

0
$\begingroup$

The chi squared test is actually just an approximation of Fisher's exact test, and the difference is negligible for large enough sample sizes. With smaller samples sizes where the approximation does not hold as well, just use Fisher's test. The only reason it's not more widely applied is because it's computationally expensive to do so, but that's not an issue with small sample sizes.

$\endgroup$
0
$\begingroup$

In the version of chisq.test in R, there is an option to use sparse data to simulate an approximate P-value:

e = c(1,2,8)
d = c(3,2,7)
j = c(12,1,0)
t = c(4,2,8)
TBL = rbind(e,d,j,t)
TBL
  [,1] [,2] [,3]
e    1    2    8
d    3    2    7
j   12    1    0
t    4    2    8

chisq.test(TBL, sim=T)

        Pearson's Chi-squared test with simulated p-value
        (based on 2000 replicates)

data:  TBL
X-squared = 21.683, df = NA, p-value = 0.0009995

So you can reject the null hypothesis that the the two categorical variables are independent at the 1% level of significance.

Comparing your observed counts with expected counts based on the null hypothesis, it seems that the largest discrepancies are in the row for 'Job responsibilities'.

You could 'collapse' the table by combining the remaining levels of that categorical variable to 'other' and applying chisq.test to the resulting $2 \times 3$ table. Even if the original test had needed no help from simulation to give a highly significant P-value, it seems worthwhile knowing that the 'Job' row is significantly different from the others:

k = e + d + t      # collapsing
TBL.2 = rbind(k,j)
TBL.2
  [,1] [,2] [,3]
k    8    6   23
j   12    1    0
chisq.test(TBL.2)

         Pearson's Chi-squared test

data:  TBL.2
X-squared = 20.597, df = 2, p-value = 3.368e-05

Warning message:
In chisq.test(TBL.2) : Chi-squared approximation may be incorrect

Even the collapsed table gives one 'expected' count that is too small according to the usual rules, but some statisticians would be willing to overlook one small expected count when the other five are sufficiently large.

chisq.test(TBL.2)$exp
  [,1] [,2]  [,3]
k 14.8 5.18 17.02
j  5.2 1.82  5.98

And, of course, in a formal report, you could mention that the simulated version of this 'job vs. other' test shows a very small P-value.

chisq.test(TBL.2, sim=T)$p.val
[1] 0.0004997501

Notes:

(1) As you mention, this study was poorly designed. With only 50 subjects spread across 12 cells of the original table, it doesn't take a genius to guess that there will be some very small observed and (hence) expected counts.

(2) My personal opinion would be not to trust Campbell's 'correction' (suggested by Harrell) of the test statistic with data as sparse as yours. (Half of your expected counts are below $5.)$ I would reserve that approximation for a situation with only relatively few 'too-small' expected counts.

(3) It is worth mentioning that Fisher's Exact Test would give a small P-value for your data. Again here, my personal preference is to reserve Fisher's test for $2 \times 2$ tables, where the rationale for its use is clear and easy to explain.

fisher.test(TBL)

        Fisher's Exact Test for Count Data

data:  TBL
p-value = 0.0002082
alternative hypothesis: two.sided
$\endgroup$
5
  • $\begingroup$ thank you for you guidance but there is a small detail i forgot to mention and I am sorry for that. we should test it at alfa=0.05 so this might differ right? $\endgroup$
    – ACA95
    Commented Jan 27, 2021 at 18:18
  • $\begingroup$ also where can I generate this fisher test? in other words, where are these codes written? $\endgroup$
    – ACA95
    Commented Jan 27, 2021 at 18:19
  • $\begingroup$ My version uses R. Other statistical software programs have it also. If the P-value is less than 0.05 (as above), then you can reject at level $\alpha = 5\%.$ $\endgroup$
    – BruceET
    Commented Jan 27, 2021 at 20:31
  • $\begingroup$ so what statistical software do you use and is it free to download so i can try it myself? $\endgroup$
    – ACA95
    Commented Jan 28, 2021 at 5:13
  • $\begingroup$ As mentioned, everything in the Ans is computed using R, which is free to download for Windows, Mac, Unix.// Many help pages online; some reliable. r-project.org. $\endgroup$
    – BruceET
    Commented Jan 28, 2021 at 5:25
0
$\begingroup$

so can we say that the 2 categorical variables are associated , (dependent) since the p value=0.001 of fisher's exact test is less than 0.05? .enter image description here

$\endgroup$
0
$\begingroup$

In this response by Frank Harrell on the subject on Chi Square tests. His recommendation is to adjust the test statistic in these cases by a factor of $(n-1)/n$.

In your case, the classic chi square test statistic is 21.68. The adjustment is to multiply by 49/50, yielding 21.24 (a very minor correction indeed). The p value for such a test on 6 degrees of freedom is 0.00165.

The data you've collected do not support the null hypothesis of no relation between job status and challenge faced.

$\endgroup$
2
  • $\begingroup$ Can you copy that link here? $\endgroup$ Commented Jan 31, 2021 at 7:50
  • $\begingroup$ @kjetilbhalvorsen Done $\endgroup$ Commented Jan 31, 2021 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.