HW 1. Math 504. Spring 2008. CSUF

by Nasser Abbasi

Problem description


question.png

Purpose and design of project

The purpose of this project is to estimate the expected value of a random variable (called $Y$) which is generated by an experiment that is described in the above problem statement. Each experiment generates one random variable $y$. The experiment is described well in the above problem statement and no need to repeat it here again.

In addition, we are asked to determine the interval over which we are 95% confident the estimated expected value will lie within. We are asked that the interval should not be wider than 1% of the true mean from either side of the estimated expected value.

The simulation involve a two stage process. In the first stage, an initial simulation was made for $20,000$ experiments in which we obtained an estimate of the population standard deviation $s$ and estimate of the population mean given by the sample mean $\bar{X}$. These 2 values are used to determined the sample size (number of experiments) needed for the second simulation performed to meet the above stated requirement for relative accuracy in expected value of $Y$. Therefore, once the first simulation is completed, the sample size for the second simulation was found by solving for $n$ (sample size) by setting the expression for the standard error to be $1\%$ of the population mean (in which we are using an estimate of which is $\bar{X}$ as generated by the first simulation). Therefore, we solve for $n$ fromMATHFinally, the second simulation was now run using the above computed $n$, and the confidence interval was found fromMATHWhere in the above equation the $s$ and $\bar{X}$ are the sample standard deviation and the sample mean resulting from this second simulation (and not the first simulation run used to estimate $n$).

Next, the histogram $Y$ was plotted to obtain an estimated of the probability density function of $Y$.

Summary of numerical results

For the initial simulation run, we used $20,000$ experiments and obtained the following estimate of the standard deviation and the population meanMATH

Now solve for $n$ from MATH we found MATH

Running the second stage simulation now to estimate the expected value of $Y$ we obtain the following result that the estimate of the expected value of $Y$ is

MATH

and the $95\%$ confidence interval was found to be

MATH

Discussion of numerical results

Since we know that the true value of MATH, we see that the

MATH

We also notice that the relative error in $\bar{X}$ (the estimate of the expected value) when compared to the true mean $\mu =\frac{15}{16}$ is calculated as MATH which is little below the $1\%$ requirement.

We note that the value of the relative error did not come out exactly $1\%$ because we used an estimate of the true mean in order to find the sample size needed for the calculation.

The result of the simulation is the estimate of the PDF of $Y$ which is shown in the plot below. The number of bins used is $50$. This was determined by trial and error to obtain the most pleasing looking histogram.


part2.png

We note that the true PDF is given below (derived in the class) and we see from the above plot that the estimated PDF is very close to the analytical PDF.

MATH