Statistical Inference
23 Apr 2015Introduction
This is the project for the statistical inference class. In it, you will use simulation to explore inference and do some simple inferential data analysis. The project consists of two parts:
- A simulation exercise.
- Basic inferential data analysis.
Simulation exercises
The exponential distribution can be simulated in R with rexp(n, lambda) where lambda is the rate parameter. The mean of exponential distribution is 1/lambda and the standard deviation is also 1/lambda. Set lambda = 0.2 for all of the simulations. You will investigate the distribution of averages of 40 exponentials. Note that you will need to do a thousand simulations.
Results
1. Show the sample mean and compare it to the theoretical mean of the distribution.
The theoretical mean and sample mean for the exponential distribution.
Theoretical mean: 5
Sampling mean: 4.9644306
The sample mean is very close to the theoretical mean at 5.
2. Show how variable the sample is (via variance) and compare it to the theoretical variance of the distribution.
The variance for the sample data is : 0.6456619 and the theoretical variance is : 0.625 Both these values are quite close to each other.
3. Show that the distribution is approximately normal.
we see that the distribution is approximately normal as the straight line is closer to the points.
If you liked this post, you can share it with your followers or follow me on Twitter! comments powered by Disqus