Skip to content

Write a program (in your favorite language) to obtain N samples from each of the following distributions: (i) Bernoulli with μ = 0.5; (ii) Poisson with parameter λ = 5; and (iii) Uniform on [0, 10].

Notifications You must be signed in to change notification settings

kittyvarghese/Random-Processes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Random-Processes

Write a program (in your favorite language) to obtain N samples from each of the following distributions: (i) Bernoulli with μ = 0.5; (ii) Poisson with parameter λ = 5; and (iii) Uniform on [0, 10]. For each distribution, do the following:

(a) Choose the number of samples N from the set {10, 100, 1000}. (b) For each value of N , repeat the experiment 10000 times. (c) Plot the histogram of the sample mean X N , with 1000 bars.

Interpret the numerical results and answer the following: (a) How many times was the sample mean in the interval [μ − 0.01, μ + 0.01] for each distribution? How about [μ − 0.1, μ + 0.1]? Answer this for various choices of N . (b) Calculate a 95% confidence interval for the sample mean using the numerical results 1 . Specify the proce- dure used for computing confidence intervals and justify your choice. How many times did the true mean fall outside the confidence interval? (c) If one wants an accuracy of 0.1 (i.e., the absolute difference between sample mean and true mean), how many samples N would be necessary? If the accuracy is to be 0.01, by how much would the number of samples N increase? Justify your answer using the empirical results for the three distributions. Correlate the empirical results with the theoretical findings in problem 1. Generalize the answer, i.e., if the accuracy increases by a decimal place, what would be the corresponding jump in N ?

About

Write a program (in your favorite language) to obtain N samples from each of the following distributions: (i) Bernoulli with μ = 0.5; (ii) Poisson with parameter λ = 5; and (iii) Uniform on [0, 10].

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published