Scinovex
article Open Access

The research on the characteristics of approximation process of chi-square distribution function based on MATLAB

Abstract

Chi-square distribution is asymptotically normal, which has been proved by predecessors. However, there is no specific description of this approximation process. Based on the previous research, this paper analyzed the specific-characteristics of chi-square distribution further by using MATLAB software. The results indicated that the chi-square distribution moves from the left to the right to gradually approach the corresponding normal distribution as its maximum values, skewness values, and kurtosis values decreasing.

Full Text

Tables and figures are in the full-text PDF.

Introduction

The chi-square distribution is very important and valuable in probability statistics. So far, many people have researched on it in order to understand and apply it better [1][2][3][4][5][6][7][8] . According to the previous researches, the chi-square distribution has asymptotic normality, that is, when its degree of freedom tends to be infinite, this distribution gradually approaches the normal distribution [9][10][11][12] . This is a beautiful result undoubtedly. However, there is a problem still unclear: How does it gradually approach the normal distribution? What are the characteristics of this process? The predecessors did not give relevant explanations yet, therefore, this paper intends to research the characteristics of the process in which the chi-square distribution approaches the normal distribution based on previous studies by using the MATLAB software.

The Characteristics of Chi-square Distribution Approaching to Normal Distribution

As for the chi-square distribution, the following conclusions have been obtained in previous researches: When the degree of freedom n tends to be infinite, the chi-square distribution gradually becomes a normal distribution ) 2 , ( n n N [10] . However, predecessors have not proposed what the characteristics of this approximation process has. To figure this out, we applied MATLAB software to analyze it. The methods and processes we used are as follows:

We let the degrees of freedom of the chi-square distribution increasing from 1 to 100, then calculated the maximum values, skewness values, and kurtosis values of each chi-square distribution function and the corresponding normal distribution, and plotted their function images.

The codes entered in MATLAB software are as follows Clear all; clc; x=-1:0.1:130; n=linspace (5,100,10); For i=1:10 A (i,: ((find(B(i,:)==MAXB(1,i))-10))*0.1; SKEWA (i)=skewness(A(i,:)); KURTA (i)=kurtosis(A(i,:)); SKEWB (i)=skewness(B(i,:)); KURTB (i)=kurtosis(B(i,:)); End Plot(x,A,'color','r','linewidth',1.8 After calculation, the function image obtained is shown in Figure 1, and the maximum values, kurtosis values, and skewness values are shown in Tables 1,2, and 3 respectively. It can be seen from Figure 1 that: (1) The images of probability density function of chi-square distribution and normal distribution are similar roughly; (2) When the degree of freedom n increases gradually, the probability density image of chi-square distribution gradually becomes low and wide; (3) When the degree of freedom n increases gradually, the function image moves to the right. It can be concluded from these changes that chi-square distribution approaches the corresponding normal distribution from the left. As can be seen from the data in Table 1, when the degree of freedom n increases, (1) The maximum values of the probability density function of the chi-square distribution and its corresponding normal distribution gradually decrease, and the maximum point gradually moves to the right; (2) The maximum values point of the square distribution is always to the left of the maximum values point of the normal distribution, and the difference of their abscissasis a fixed value of 2;

(3) The maximum values of the two distributions gradually decrease, and their differences also gradually decrease. Therefore, the maximum values point of the chisquare distribution and the corresponding normal distribution function approaches as the degree of freedom increases, which is mainly reflected in the vertical direction. , then when n tends to infinity, the ) ( n  distribution tends to the standard normal distribution [10] . So what are the characteristics of this approximation process? We also applied MATLAB software to figure it out. The methods and processes we used are as follows: When the degree of freedom n increases from 1 to 300, we used MATLAB software to plot multiple probability density function images of A (i,:)=(chi2pdf(x,n(i)))*sqrt(2*n(i)); B (i,:)=(x-n(i))/sqrt(2*n(i)); Plot (B(i,:),A(i,:));hold on; Axis ([-4 4 0 0.5]); MAX (1,i)=max(A(i,:)); MAX(2,i)=(((find(A(i,:)==MAX(1,i))-3500))*0.1n(i))/sqrt(2*n(i)); SKEW (i)=skewness(A(i,:)); KURT (i)=kurtosis(A(i,:)); End MAX SKEW KURT y=normpdf(x,0,1); Plot (x,y,'color','r','linewidth',2.2) Grid on Xlabel ('x') Ylabel ('y') Legend ('n from 1 to 300') After calculation, the images we obtained are shown in Figure 2, and the maximum values, kurtosis values and skewness values are shown in Tables 4, 5 and6. From the data in Table 5, it can be seen that the skewness values of the ) ( n  distribution is always greater than 0. As the degree of freedom increases, its skewness values gradually decreases, and the decreasing speed becomes slower and slower. It indicates that the

distribution function is positively skewed, and as the degree of freedom increases, it gradually approaches the normal distribution, and the approaching speed becomes slower in the process. From the data in Table 6, it can be seen that as the degree of freedom increases, the kurtosis values of the ) ( n  distribution gradually decreases, and the decreasing speed becomes slower and slower, which also indicates that the distribution gradually approaches the normal distribution, and the approaching speed becomes slower and slower.

Conclusion

It can be concluded from the analysis above that the chisquare distribution has the following characteristics in the process of the degree of freedom n increasing and approaching the normal distribution: 1. The chi-square distribution moves from the left to the right to gradually approach the corresponding normal distribution to be the probability density function of the chi-square distribution with degree of freedom n, so when the degree of freedom n approaches infinity, the distribution of the probability density function This research mainly applied MATLAB software to analyze the characteristics in the approximation process. In order to conduct the research feasibly and conveniently, the degree of freedom n has only been set in a range that is not too large. Therefore, it requires further study on whether there are any other characteristics in the process of chi-square distribution tending to normal distribution. Additionally, in this study, we found that the kurtosis values and skewness values calculated by MATLAB software are inaccurate, and even the kurtosis and skewness values of the standard normal distribution are inaccurate, so this problem also needs study further.

Acknowledgment

Citations
0
FWCI
0.00
field-weighted impact
References
0
Percentile
3%
vs. same field & year
Citation Network

How this paper connects to the literature. Drag to explore, click any node to open that paper.