First of all, we need to organize the data files we want to analyze into matrix files, that is, data files with clear rows and columns.
02
After we open matlab, click "Import Data" in the menu bar, and prepare to load the data we need for statistical analysis.
03
After opening the loading interface, we find the data file we want to load and click Open.
04
In the loading interface, we will select "Matrix" matrix list as the type, select the column data we need to import, and then click "impress selection" on the right to import.
05
After importing, we click on the matrix list we imported, as shown in figure "S260". Be careful not to open it, just select it and click "Drawing" in the menu. In the drawing toolbar, click the small triangle to the right of the icon to open more chart types.
06
In the expanded matlab icon, we find "histfit" and click Open.
07
Finally, draw the normal distribution map and the columnar distribution map we need.
How to calculate the standard deviation of normal distribution with matlab
Methods/steps
0 1
Mathematical expression of normal distribution
If the random variable X obeys a Gaussian distribution with a mathematical expectation of μ and a variance of σ 2, it is recorded as N(μ, σ? )。 The expected value μ of probability density function with normal distribution determines its position, and its standard deviation σ determines its distribution amplitude. N(μ,σ? The probability density and cumulative probability density functions of continuous random variable X are shown in the following figure respectively:
02
The grammatical rules and functions of three commonly used instructions about normal distribution provided by matlab are shown in the following figure:
03
In this step, we will calculate the probability, the meaning of standard deviation and the geometric representation of the specified interval. Specific calculation, implementation code and comments are shown in the following figure:
04
The following figure shows the execution result of the last calculation code.
05
Probability significance of standard deviation of normal distribution
As can be seen from the above figure, the probability that the observed value X falls in the interval of [μ-σ, μ+σ], [μ-2σ, μ+2σ], [μ-3σ, μ+3σ], that is, p (μ-k σ≤ x≤ μ+k σ) is 0.6822 respectively. Because p (μ-k σ≤ x≤ μ+k σ) = p (x-k σ≤ x ≤ k σ), this probability can be said as follows: the probability that one, two and three standard deviation intervals on both sides of the measured data contain the mean value of the measured data is 0.68269 and 0.9545 respectively.