probability and statistic
Lecturer : Dr. Bystrik Probability and Statistics University of Miami Fall 2017
Final Assignment on Technology
Problem 1 2 Total
Points possible 12 12 24
Points earned
Student name:_____________________________________________________
Student ID:________________________________________________________
Please provide print-outs for your solutions, each on a separate page, both the input and the outputs, for the full credit.
Good luck!
Problem 1
In this problem we will use N, notation, to match the Mathematica’s notation. Note the alternative, also common, parametrization: the Gammar, distribution is
implemented as Gammar, 1
) in Mathematica. Use Mathematica commands to create the density plots and the bar charts for the
distributions below. Do not forget to load three packages from the Mathematica kernel (for graphics, for
continuous distributions, and for discrete distributions) at the beginning of a Mathematica session.
(a)
N0, 1, N0, 10, N1, 1
(b)
Gamma 1 2
, 1 2
(c)
Binomial10, 0. 10
(d)
Poisson1
Problem 2 In this problem we will use N, notation. A sum of Binomialn, p variables is normally distributed if n is "large", but p and 1 − p is
not too small compare to n, commonly np ≥ 10, n1 − p ≥ 10:
Y ∑ k1
n
Yk
Yk Bernoullip
Y Binomialn, p
as n gets large and np ≥ 10, n1 − p ≥ 10:
Y
d
→ Nnp, np1 − p
Z Y − np
np1 − p N0, 1
This is a manifestation of the CLT. However if n is "large", but p or 1 − p is small enough for np to remain (commonly) under
10, Poisson is a more suitable approximation for such a binomial distribution:
lim n→
Cn, xpx1 − pn−x x exp−
x! where np (commonly 10)
You are asked to use Mathematica to investigate how well an appropriate Poissonian distribution approximate the given binomial distributions:
Will the quality of the approximation improve if we keep n the same and decrease p? Will the quality of the approximation improve if we keep p the same and increase n?
Steps:
Generate the table of values for the p.d.f.
pX0, pX1, pX2, pX3, pX4, pX5
for both binomial and the corresponding Poisson distributions described below.
Generate the table of values for the differences and the ratios of the corresponding binomial and Poisson p.d.f. values. Judge the quality of the approximation by observing, how close the differences are to 0, how close the ratios are to 1.
(a) n 10, p 0. 10 (b) n 10, p 0. 01 (c) n 50, p 0. 10 (d) n 50, p 0. 01