- •Laboratory work №4.6
- •Automation of statistical computing
- •In Mathcad to determine the sample variance stored in the matrix X, intended the function var (X) - sample variance, and the value of d can be calculated by the formula:
- •Variance and standard deviation (two methods of calculation).
- •Picture 2.3- Solutions Example 2.2
- •2. The duration of the operation of electron tubes of the same type (the times)
- •3. Measuring the capacity of 80 field-effect transistors
- •6. Given a sample mass of steel billets (g).
- •4. Hour of recovering diodes from the same batch (nanoseconds)
- •5. The hours of reaction (in seconds):
- •7. Changes of the limits of the strength on break for the steel sheet
- •8. The depth of the diffusion layer, defined by the sample from the party of the chips, has the following values (μm)
- •9. At a given current of 10 mA was measured direct voltage drop on the diodes Obtained the following values (volts)
- •10. Measuring the mass of a substance as the result of a chemical reaction (g)
- •11. The productiveness of the Department within 20 working days was characterized by the following numbers (in conventional units)
- •12. For 24 details was obtained the following deflection of control size from the nominal value (μm)
- •13. Measured resistivity in the sample batch of chips after doping the polysilicon
- •14. Data on the average number of family members
- •15. Given the following data on the yields of wheat
- •16. Data about tariff rank of 50 workers of one of the department of the plant
- •17. The output of services by category (2010/2009%)
- •18. Interest rates on loans (collateral loan, %)
- •19. The average population growth (cm)
- •20. The importance of the results on a 10-point greatest scale
- •21. The structure of gdp(gross domestic product) in 2000 and 2010 (industry - construction)
- •22. The fact of the execution of the plan by the company by product types (th.Units)
- •23. Data about the value of fixed assets of 50 enterprises
- •24. The dynamics of power consumption 24 1990 2010 (gw.H)
- •25 Coefficient of work motivation
In Mathcad to determine the sample variance stored in the matrix X, intended the function var (X) - sample variance, and the value of d can be calculated by the formula:
~ |
|
1 |
|
|
|
|
|
|
|
|
|
D |
|
|
var (x) |
|
|
||||||
|
|
|
|
|
|||||||
n |
1 |
|
|
||||||||
|
|
|
|
|
|
|
|
|
|||
Another parameter to determine the degree of decoding values of a random variable is the root-mean-square deviation, variance associated with variance by the ratio
stdev(x)
—
the root-mean-square deviation (stansard).
Example 1.1 Calculation of the numerical characteristics of a random vector (figure 1.1)
x runif(1000 0 1) m mean(x) median(x) 0.504
stdev (x) 0.292
var(x)
0.292
Figure 1.1 - example Solution 1.1
Example 1.2 the Calculation of numerical characteristics of a sample of small volume (according to five data) and using two more functions that make sense for the variance and standard deviation.
ORIGIN 1
x ( 5 2 14 3 2 )
n length(x) n 5
The mathematical expectation (the two methods of calculation).
-
1
x 5.2
n
m mean (x)
m 5.2
median (x) 3
max (x) 14
mode (x) 2
min (x) 2
Variance and standard deviation (two methods of calculation).
-
n1
1
xi m2
= 20.56
n
i 0
var(x) 20.56
Var (x)
n 1
20.56
n
var(x) 4.534
stdev(x) 4.534
Stdev(x)
n 1
4.534
n
n1
1
xi m2
= 25.7
n 1
i 0
Var(x) 25.7
Var(x) 5.07
Stdev(x) 5.07
Figure 1.2 - example Solution 1.2
Sometimes there are used other numerical characteristics of random variables.
The asymmetry factor specifies the degree of the distribution of the data around the center of the sample.
A n*1*3 n( xi m*)3
i1
The degree of "smoothness" of the probability density within the main maximum is set to another value - the coefficient of kurtosis. It shows how sharp the peak has the probability density compared to the normal distribution. If the coefficient of kurtosis is greater than zero, then the distribution has a sharper peak than the Gaussian distribution, if less than zero, then more flat.
E n*1*4 n( xi m*)4 3
i
1
In Mathcad to calculate the coefficient of skewness and kurtosis it is used two built-in functions:
• kurt (x) - sample kurtosis of random variables x;
• skew (x) - the coefficient of sample skewness of random variables x.
Example 1.3 Calculation of the coefficients of skewness and kurtosis
Part 2: Suppose that from the general population the sample was extracted, moreover in the way of the selection the value x1 was observed m1 times, x2 – m2 times, xk – mk times.
k
mi n
i1
where n- the size of a sample
The number mi shows how many times the given value xi met in the way of the selection, and is called the frequency options. If we write the sequence of values xi in ascending or descending order and the corresponding frequency, you get a table - discrete variational range
Meaning |
x1 |
x2 |
|
x k |
|
|
|
|
|||
Frequencies |
m1 |
m2 |
|
m k |
|
|
|
|
the ratio of the frequency mi to the sample size n is called the relative frequency:
The statistical distribution of the sample is a sequence variant and the corresponding frequencies or relative frequencies, in other words the discrete variational number characterizes the statistical distribution of the sample.
If the interval between the smallest and largest values in the sample divide into several intervals of equal length and to each interval match the number of sample values that fall in this interval, then we obtain interval variational series. The statistical distribution of the sample can be also specified by interval variational series.
If n is the sample of the random variable X defined as the interval variational series, in this case, the empirical distribution function is defined only at the ends of the interval.
Intervals |
[a1, a2) |
[a2, a3) |
|
[ak, ak+1) |
|
Freqencies |
m1 |
m2 |
|
m k |
|
|
|
|
Example 2.1. Let the sample of a random variable X is set by discrete variational series (Table 1).
Table1
|
x i |
|
|
37 |
|
38 |
|
39 |
|
|
40 |
|
41 |
|
42 |
|
43 |
44 |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m i |
1 |
|
3 |
|
5 |
|
|
|
8 |
|
12 |
|
9 |
|
5 |
2 |
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|||||||||||||||||||||||
According to this table, we define the cumulative frequencies and cumulative relative frequency table (Table 2).
|
xi |
|
|
37 |
|
38 |
39 |
|
40 |
|
|
41 |
|
42 |
|
|
43 |
|
44 |
|
45 |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mxi |
|
|
0 |
|
1 |
4 |
|
9 |
|
|
17 |
|
29 |
|
|
38 |
|
43 |
|
45 |
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wx |
|
|
0 |
0,022 |
0,089 |
|
0,2 |
|
0,378 |
|
0,644 |
|
0,844 |
0,956 |
|
1 |
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lets determine the empirical function Fn (x) and construct its graph
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig.2.1 - The first variant solution Example 2.1
Fig.2.2 - The second variant solution Example 2.1
The dotted curve is called the cumulative curve (cumulati).
Example 2.2 Lets a sample of a random variable X is set by the interval of variation series (Table 3)
Table 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
xi |
[-1,75; -1,25) |
|
[-1,25; -0,75) |
|
[-0,75; -0,25) |
|
[-0,25; 0,25) |
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m i |
5 |
|
|
|
|
8 |
|
|
|
|
|
9 |
|
|
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xi |
[0,25; 0,75) |
|
|
|
|
[0,75; 1,25) |
|
[1,25; 1,75) |
|
|
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m i |
9 |
|
|
|
|
|
|
3 |
|
|
|
|
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To construct the empirical distribution function Fn (x) compute the accumulated frequency wai (Table 4)
Table 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
ai |
|
-1,75 |
|
-1,25 |
|
-0,75 |
|
|
-0,25 |
0,25 |
0,75 |
1,25 |
|
1,75 |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wai |
|
0 |
|
0,1 |
|
|
0,26 |
|
|
0,44 |
0,68 |
0,86 |
0,92 |
|
1 |
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lets determine the empirical function Fn (x) and construct its graph(picture2.3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
