• No results found

Lab1

N/A
N/A
Protected

Academic year: 2020

Share "Lab1"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

1 STATISTICAL MODELING OF STOCHASTIC SYSTEMS

1.1 General information

To carry out the analysis of a stochastic system, we start out by defining a set of measurable variables associated with a given system. For example, particle po-sitions and velocities, or voltages and currents in an electrical circuit, which are all real numbers. By measuring these variables over a period of time [t0,tf ] we may then collect data. A subset of variables that we have the ability to vary over time defines a set of time functions which we shall call the input variables. A set of va-riables which we assume we can directly measure while varying input vava-riables de-fine a set of output variables. These may be thought of as describing the

“re-sponse” to the “stimulus” provided by the selected input functions. For short, we refer to them as the input and output respectively.

The scheme of simulation experiment is shown in Fig. 1.1.

Fig. 1.1.

In this experiment the input sequence u(t) is an RV with uniform (flat) distri-bution with parameters a0 and b1. The effectiveness of statistical modeling and confidence of its results depends on quality of the input sequence u(t). That’s why the random-number generator should be preliminarily verified according to different statistical tests, including uniformity and independency verification.

To verify the uniformity of the input random sequence u(t)xi, і 1,N one can use the next statistical estimates:

 

N

N

x N x

N 1

2

1

. 3 1 1

; 2 1 1

i

i i i

(1.1)

The independency verification of random sequence elements {} is done

(2)

doesn’t depend on the value that another one has possessed. Let  denote the shift of the sequence then the estimate of correlation function can be calculated as

1 , 0 ; 1

1 ) ( ~

1

 

 

 

   

N x

x N

R N

i

i

i , (1.2)

where  

i i x

x – is a centered sequence of RVs  – is the expected value of RV x.

If RVs are independent, R~()0. For any 0 if N is big enough, then with probability  the next relation is true

. / 1 )

( ~

N

R   (1.3)

Then with probability  one can state then the received sequence of RVs {}

satisfies the statistical independence hypothesis.

To verify the distribution law a statistical analog of probability density/mass function (pdf/pmf) is built – a density histogram. For that purpose we build a tabu-lated statistical array – a table of categories xі…xі+1, and corresponding statistical

frequenciesPi*.

x1…x2 x2…x3 xі…x і+1 xк-1…xк

* 1

P P2* … Pi* … Pk*1

And

1

1 *

1

k

i i

P . (1.4) The frequencies Pi* of events

X(xi,xi1)

is calculated as the ratio of number ni of experiments, in which the value of RV X appeared in the i-th range

1 ... i i x

x , to the total number N of experiments.

The example of density histogram is shown in Fig. 1.2.

Normal (Gaussian) distribution

(3)

1. Reserved constant с = 2.

2. R 2ln1. 3.  = с2.

4. U1 = Rcos, U2 = Rsin .

5.

1 2

2 1

U U

U   .

Algorithm А2.

1. V1= 21 - 1, V2 = 22 - 1.

2. sV12 V22.

3. If s  1 return to step 1.

4. R (2lns) s.

5. U1= V1R, U2 = V2R.

6.

1 2

2 1

U U

V  

To model the normal distribution with mean 0 and standard deviation 1

Ui should be transformed as follows: Ui Ui

Exponential distribution

Algorithm С1. 1. Generate .

2. ln .

 

 

V

Algorithm С2 (for 2 RVs).

1. Generate 1, 2, 3. 2. s =ln(12).

3. V = -1 3s, V = (2 3 - 1)s.

Uniform (flat) distribution

Algorithm D1.

-6 -4 -2 0 2 4 6 8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Рис. 1.1 Гістограма щільності роз-подідення

Р*

(4)

1. Generate .

2. V = a (ba).

Binomial distribution

Algorithm Y1.

1. W = , k = 0, P1 = q n

.

2. W = W - P1.

3. If W < 0, go to step 6.

4.

.

1 1

1

q k

p k n P P

  

5. k = k + 1, go to step 2. 6. V = k.

Algorithm Y2. 1. s = 0, k = 1. 2. Generate k.

3. If k< p, then s = s + 1.

4. k =k + 1.

5. If kn, go to step 2. 6. V = s.

Algorithm Y3 (for large р). 1. k= 0, L= 0.

2. Generate k.

3. , 1.

1 ln

ln

  

k k q

L

Lk

4. If Ln, go to step 2. 5. V = k - 1.

Poisson distribution

Algorithm V1 (for small ).

1. p = exp(-), k = 0, s = 1. 2. k = k + 1, s = sk.

3. If s > p, go to step 2. 4. V = k-1.

(5)

1. Generate U, using algorithm А2. 2. V

U  

.

1.2 Execution order

In laboratory work the programming tool set of MatLab is used. 1.Write down the answers to the questions:

– What are the requirements to the input random sequence during the statistical modeling of a stochastic system? How can the quality of the input sequence be verified?

– What is analytical and graphical form of the pdf/pmf for a given distribution? What parameters does it have, what is the meaning of these parameters? Give an example of using this distribution when telecommunication systems are modeled.

2.Generate an input sequence of RVs, sample size N=1000. Plot a diagram of the input sequence and its density histogram.

3.Verify the quality of the input sequence, draw a conclusion if it satisfies the required properties. Plot a correlation function. Find the probability of that the received sequence satisfies the statistical independence hypothesis.

4.Increase the sample size of the input sequence. Plot a diagram of the input sequence and its density histogram. Plot a correlation function. Find the probability of that the received sequence satisfies the statistical independence hypothesis. Draw a conclusion how the quality of the input sequence has changed.

5.Synthesize a system under consideration according to the first algorithm of a task variant given in table 1.1 (compile a program realizing the given algorithm). Table 1.1.

Variant 1 2 3 4 5 6 7 8 9 10

Algorithm A1 C1 Y1

A2 D1 V1

A1 C2 Y2

A2 C1 V2

A1 D1 Y3

A2 C2 Y1

A1 C1 V1

A2 D1 Y2

A1 C2 V2

A2 C1 Y3 6.Generate an output sequence of RVs using the compiled program. Plot a diagram of the output sequence and its density histogram.

7.Change the parameters of the given distribution in the program according to a task given in table 1.2. Plot a new diagram of the output sequence and its den-sity histogram. Draw a conclusion how this parameter changes the form of the pdf/pmf curve.

Table 1.2.

1st algorithm 2nd algorithm 3rd algorithm

a b p

(6)

2nd student 115 130 25 – – – 0,4

3rd student 70 25 15 – – – 0,3

2 1st student 85 95 – 100 150 1,5 –

2nd student 30 65 – 25 50 0,5 –

3rd student 125 135 – 1000 2000 3 –

3 1st student 55 10

find

– – – 0,7

2nd student 105 140 – – – 0,85

3rd student 75 80 – – – 0,9

4 1st student 90 160 10 – – 25 –

2nd student 35 15 20 – – 10 –

3rd student 120 145 5 – – 35 –

5 1st student 40 50 – 0,5 1,5 – 0,85

2nd student 100 115 – 10 100 – 0,75

3rd student 60 70 – 70 75 – 0,9

6 1st student 110 85

find

– – – 0,2

2nd student 20 30 – – – 0,35

3rd student 150 125 – – – 0,45

7 1st student 45 55 7 – – 2 –

2nd student 130 105 3 – – 0,7 –

3rd student 25 75 9 – – 2,5 –

8 1st student 95 90 – 500 1000 – 0,95

2nd student 65 35 – 20 30 – 0,85

3rd student 135 120 – 50 250 – 0,7

9 1st student 10 40

find

– – 20 –

2nd student 140 100 – – 40 –

3rd student 80 60 – – 15 –

10 1st student 160 110 6 – – – 0,75

2nd student 15 20 4 – – – 0,95

3rd student 145 150 8 – – – 0,85

References

Related documents

Decreased side effects. Improved patient compliance. Pulse release allows multiple dosing in a single dosage form. These systems can be utilised for many solid dosage

We also provide training on short- and long-range scanners, GD&amp;T, 3D data processing, reverse engineering and quality control/inspection software. All the Creaform

In België oordeelde de rechter dat het in het belang van het kind was dat, ook al werd het in België verzorgd en opgevoed door de kafils (‘kafala’-ou- ders), geen adoptie

The results of hedonic test showed that average value of panellist’s favourite level on the overall attribute of high antioxidant cake ranging from 4.44 to 5.26 (usual).. The

Meidam et al., Parametrized tests of the strong-field dynamics of general relativity using gravitational wave signals from coalescing binary black holes: Fast likelihood

The Pre-View 3 programme aims to enhance parental confidence and knowledge of SRE, by provid- ing – in conjunction with the Schools Library Service – opportunities and

With the debut of a program called Priority Rewards, Priority Health is leading Michigan with an innovative solution that rewards members for choosing to receive care at