Four table fisher test

1. Case introduction

A doctor treats 27 patients with a certain disease with old and new drugs. The treatment results are shown in the table below. Now I want to know whether there is any difference in the therapeutic effects of the two drugs?

2. Problem Analysis

The purpose of the analysis of this case is to explore whether there is any difference in the effect of the two treatments. The total sample size is 27<40. Therefore, the four-table Fisher's exact test is considered for analysis, but two conditions need to be met:

Condition 1: Both the grouping variable and the observation variable are binary variables; the data group and treatment effect in this case are both binary variables, which meet this condition.

Condition 2: The observations are independent of each other; in this case, the 27 patients are all independent, and the treatment effects do not interfere with each other, which meets this condition.

Therefore, the four-table Fisher's exact test can be used for analysis.

3. Software operation and result interpretation

(1) Theoretical explanation

The basic idea of ​​Fisher's exact test method in the four-table table is: under the condition that the total number of surrounding areas remains unchanged, calculate the probability Pi of various combinations of the four actual frequency changes in the table; then use one-sided or two-sided The cumulative probability P of , is inferred based on the test level α taken.

Fisher's exact test method was proposed by RA Fisher in 1934. It is based on the hypergeometric distribution theory to directly calculate the probability of rejecting the null hypothesis, so there will be no chi-square value. This method is based on the hypergeometric distribution and uses the mathematical principle of permutation to perform calculations. The amount of calculation is relatively large and it is not suitable for manual calculations. Therefore, software calculations are used to directly obtain the p value for judgment.

(2) Software operation

In the SPSSAU experiment/medical research module, select [Fisher chi-square]. Follow the prompts and fill in the case data in the form. Note that cell A1 must be empty and there is no need to fill in the summary data. The operation is as follows:

(3) Interpretation of results

1. Test statistics table

The SPSSAU output test statistic results are as follows:

It can be seen from the above table that the corresponding p value of Fisher's exact test is 0.3705, >0.05, so the null hypothesis cannot be rejected, that is, the therapeutic effects of the two drugs cannot be considered to be different.

At the same time, it can be seen that, in addition to Fisher’s chi-square, SPSSAU outputs Pearson’s chi-square value and continuous correction chi-square value as well as the corresponding p values ​​at the same time. From the p-value results, all three values ​​show a consistent conclusion, that is, The therapeutic effect of the two drugs cannot be considered to be different.

So how should the three chi-square values ​​be selected? You need to look at the expected frequency table to judge.

2. Expected frequency table

The expected frequency of SPSSAU output cases is as follows:

usually:

If the total sample size is greater than 40 and the expected frequency values ​​are all greater than 5, the Pearson chi-square value is generally used;

If the total sample size is greater than 40, but there are cells with an expected frequency less than 5, the continuous correction chi-square can be used first, or the fisher chi-square value can be used;

If the total sample size is less than 40, or there are cells with an expected frequency less than 1, it is recommended to use the fisher chi-square test.

From this, we also understand why in the analysis of the second part of the question, the total sample size of this case is 27 less than 40, so Fisher's exact test is used for analysis.

4. Conclusion

In this case, 2*2Fisher's exact test was used to compare and analyze the therapeutic effects of the new drug and the old drug. Since the total sample size was 27<40 and the conditions required by the Fisher's exact test were met, this method was used for analysis. The analysis results show that the p value corresponding to Fisher's exact test is 0,3705>0.05, so the null hypothesis cannot be rejected, and the difference in the therapeutic effect of the two drugs is not statistically significant, that is, it cannot be considered that the treatment effect of the new drug and the old drug The effect is different.

5. Knowledge Tips

(1) Which of the three types of chi-square test values ​​should be considered?

Under normal circumstances: if the total sample size is >40 and the expected frequency values ​​are all greater than 5, the pearshon chi-square value is generally used; if the total sample size is greater than 40, but there are cells with an expected frequency less than 5, continuous correction can be used preferentially Chi-square, or use the fisher chi-square value;

If the total sample size is less than 40, or there are cells with an expected frequency less than 1, it is recommended to use the fisher chi-square test. The specific documents shall prevail, and the standards of different documents may not be completely consistent.

(2) How to calculate the expected frequency?

We call the number of occurrences of each observed variable the frequency, and the expected frequency is the expected value of the frequency. For the r*c row list, the expected frequency corresponding to the observation frequency O_{rc} in the rth row and column c grid is E_{rc}=\frac{n_{r}n_{c}}{n}, where n_{ r} is the total number of row r, n_{c} is the total number of column c, and n is the total sample size.

For example, in this case, the effective number of the old medicine in row 1 and column 1 is 2, then its expected frequency is 5*16/27=2.963; other calculations are similar.

references:

[1] Yan Hong, Xu Yongyong. Medical Statistics. 3rd Edition [M]. People's Health Publishing House, 2015

Guess you like

Origin blog.csdn.net/m0_37228052/article/details/131471944