Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Probability theory and mathematical

statistics.
Laboratory work 1.

dr. V. Nekrašaitė-Liegė

1 How to choose right parameters in your tasks?


First of all you must define some notations:
nl – number of letters in your name.
sl – number of letters in your surname.
month – your birthday month.
mod(x/y) – residual got when x is divided by y. For example: mod(5/2) = 1, mod(5/3) = 2.
NOTE. In R program mod(5/2) expression should be written as 5%%2.
Your constants for the tasks:

1. TASK 1. p1 = (mod(sl/4) · 0.1 + 0.5); p2 = mod(nl/4) · 0.1 + 0.05; h = mod((nl +


sl)/6) + 3) · 10.

2. TASK 2. M = (mod(sl/4) + 1) · 100; n = mod(nl/4) + 60; m = month + 20.

3. TASK 4. k = mod(nl/3) + 4; n = month · 500.

4. TASK 6. i = (mod((nl + sl)/3) + 1):

(a) if i = 1 then: X ∼ Binomial(n, p); N = month · 1000; par: n = (mod(month/4) +


3); p = (mod(sl/5) + 1)/10.
(b) if i = 2 then: X ∼ P oisson(λ); N = month · 1000; par: λ = (mod(month/3) + 1).
(c) if i = 3 then: X ∼ geometrical(p); N = month · 1000; par: p = (mod((nl + sl)/8) +
1)/10.

2 Tasks
1. You ask your neighbor to water a sickly plant while you are on vacation. Without water it
will die with probability p1; with water it will die with probability p2. You are h percent
certain that your neighbor will remember to water the plant. What is the probability
that the plant will be alive when you return? If it is dead when you return, what is the
probability your neighbor forgot to water it?

2. There are unknown number of moose on Isle Royale. To estimate the number of moose,
M moose are captured and tagged. Six months later n moose are captured and it is found
that m of these are tagged. Draw a graph for probability, that out of n selected moose
m are tagged. Estimate the maximum likelihood number of moose on Isle Royale from
these data. What is this probability?

1
3. Using the letters from your name and surname, model experiment of getting a sequence
of 2000 elements with unequal probabilities (probabilities should show the frequency of
the same letters occurrence in your name and surname.) Using a histogram compare the
probabilities before and after experiment. NOTE. The letters in the population should be
written in alphabetical order.

4. Using sample procedure, model experiment of tossing k dices. Do this experiment n times.
Draw an empirical and theoretical density function of number of ”more than 4” occurred.
Calculate the mean and variance. Compare with theoretical mean and variance. NOTE.
Mean, sum and variance for the x vector you can find using mean(x), sum(x), var(x)
functions.

5. Let X is a random variable distributed by normal distribution with two parameters m


and s. Using density function find out how these parameters change density function
(draw 4 graphs, where m is fixed and s is increasing, to find out what s does to the
graph. Then draw 4 graphs, where s is fixed and m is increasing, to find out what m
does to the graph).

6. Let X is a random variable distributed by x distribution, with parameter (parameter’s)


par. Generate this random variable N times. Calculate the mean and variance. Compare
with theoretical mean and variance. Draw an empirical density function.

You might also like