Homework Assignment #2
- Create a random sample of size 100 from the binomial distribution
with n = 20 and p = 0.4.
Display in a histogram.
Find the sample mean and sample standard deviation.
Compare these sample statistics with the theoretical values.
- Repeat exercise 1 for the normal distribution
with mean 40 and standard deviation 8.
- Repeat exercise 1 for the Poisson distribution with lamba = 4.
- Construct a 9 by 6 matrix
where row i represents a probability mass function
of the binomial distribution with n = 6 and p = i/10.
Give meaningful names to the rows and columns.
Print the matrix on screen rounding all numbers to four places.
- Repeat exercise 4, but display the cumulative distrubtion function,
P(X <= x) in each row.
- For the binomial distribution with n = 5,
find the probability of 3 or more successes for
p = 0.01, 0.02, ..., 0.99.
Graph the values versus p
and display them in a graph with meaningful labels.
Last modified: March 17, 1997
Bret Larget,
larget@mathcs.duq.edu