probability and statistic

YANGYANG
Mathematicaassignment.pdf

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 Gammar, distribution is

implemented as Gammar, 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)

N0, 1, N0, 10, N1, 1

(b)

Gamma 1 2

, 1 2 

(c)

Binomial10, 0. 10

(d)

Poisson1

Problem 2 In this problem we will use N, notation. A sum of Binomialn, p variables is normally distributed if n is "large", but p and 1 − p is

not too small compare to n, commonly np ≥ 10, n1 − p ≥ 10:

Y  ∑ k1

n

Yk

Yk  Bernoullip

Y  Binomialn, p

as n gets large and np ≥ 10, n1 − p ≥ 10:

Y

d

→  Nnp, np1 − p

Z  Y − np

np1 − p  N0, 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→

Cn, xpx1 − pn−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.

pX0, pX1, pX2, pX3, pX4, pX5

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