Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Laboratory work 4.6 eng.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
1 Мб
Скачать
☆

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).

n1

1

  xi  m2

= 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

n1

1

  xi  m2

= 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*3n( xi  m*)3

i1

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*4n( 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

i1

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)

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]