5.3. Stochastic Modeling. Discrete RV

Слайд 2

Random objects
Random events
Random variables
Random processes
Random point processes

BG

Transformation

α

X

Random objects and base generator

Random objects Random events Random variables Random processes Random point processes BG

Слайд 3

Discrete RV

METHODS OF GENERATION

Discrete RV METHODS OF GENERATION

Слайд 4

Discrete RV given by distribution

A1

A2


Am

yes

no

Discrete RV given by distribution A1 A2 … Am yes no

Слайд 5

Statistical processing for discrete RVs

Mathematical expectation (mean):

Variance:

ni is the number of appearances

Statistical processing for discrete RVs Mathematical expectation (mean): Variance: ni is the
of value i (they are named as frequencies), N is the total number of trials

Relative frequencies

Empiric expectation (average):

Empiric variance:

Absolute errors:

Relative errors:

Слайд 6

Statistical processing for discrete RVs

Chi-squared test

Hypothesis that empiric distribution corresponds to the theoretical

Statistical processing for discrete RVs Chi-squared test Hypothesis that empiric distribution corresponds
one is not true if and only if

α is a significance level

Слайд 7

Laboratory #9

ASSIGNMENT:
Simulation of discrete random variable
Implement an algorithm for conducting a

Laboratory #9 ASSIGNMENT: Simulation of discrete random variable Implement an algorithm for
series of experiments to simulate a discrete random variable specified by the distribution
Calculate empirical probabilities, sample mean and variance, their relative errors
Calculate the chi-squared statistic and apply the chi-squared test for different values of N (N = 10, 100, 1,000, 10,000)
Draw a conclusion

Слайд 8

Laboratory #9

ЗАДАНИЕ:
Имитационное моделирование дискретных случайных величин
Реализовать алгоритм проведения серии экспериментов по

Laboratory #9 ЗАДАНИЕ: Имитационное моделирование дискретных случайных величин Реализовать алгоритм проведения серии
генерации дискретной случайной величины, заданной рядом распределения
Вычислить эмпирические вероятности, выборочные среднее и дисперсию, их относительные погрешности
Вычисление статистику хи-квадрат и применить критерий хи-квадрат при разных значениях N (N = 10, 100, 1 000, 10 000)
Сделать вывод

Слайд 9

Laboratory #9

UI PROTOTYPE

Prob 1

Prob 2

Prob 3

Prob 4

Prob 5

Number of experiments

auto

Start

Average: 2.897 (error

Laboratory #9 UI PROTOTYPE Prob 1 Prob 2 Prob 3 Prob 4
= 8%)
Variance: 2.072 (error = 9%)

Chi-squared: 13.51 > 9.488

is true

Слайд 10

Uniform discrete distribution

Int is a truncating operation

FROM 0 TO n:

FROM a TO

Uniform discrete distribution Int is a truncating operation FROM 0 TO n:
b:

Set n = b - a
Use
Calculate x = x + a

For example, if x from {1, 2, .., n} then use formula:

GENERATOR:

Слайд 11

Geometric distribution

 

GENERATOR:

Geometric distribution GENERATOR:

Слайд 12

Negative binomial distribution

 

GENERATOR:

Negative binomial distribution GENERATOR:

Слайд 13

Binomial distribution

 

GENERATOR:

where

is a Heaviside step function

Binomial distribution GENERATOR: where is a Heaviside step function

Слайд 14

Poisson distribution

 

Poisson distribution

Слайд 15

Poisson distribution generator

GENERATOR:

Poisson distribution generator GENERATOR:

Слайд 16

Laboratory #10

ASSIGNMENT:
Football manager game

Basketball

Laboratory #10 ASSIGNMENT: Football manager game Basketball

Слайд 17

Laboratory #10

Use Poisson distribution for the number of goals in a match

Laboratory #10 Use Poisson distribution for the number of goals in a match