The concept of a

Part of that determination was to state the

To do this we used that the fact that the

That whole process depends upon us knowing the value of

We introduce the process above because it is a great model for creating a

From a sample of size

The

Or, because we want the convenient

There, on the row for 24 degrees of freedom and in the

Or, because we can use R, we could just give either one of the two commands

It makes no difference if we find the positive or the negative

For the problem we have been using,

Just as we saw in the case where we know the population standard deviation, we can change the magnitude of the

To illustrate this, we could do the same computations but for a

The second way we can alter the width of the

If we have a desired

For the current example, where have a sample size of

That computation suggests that a sample size of

This would be a good time to return to the web page that takes 1000 samples of a given size and computes

We can change those values so that we are looking at a

At that point if we click on "Use Those Parameters" then we get a new page with a population, 1000 samples, and confidence intervals for each. Furthermore, each that you return to that page and click the button you get a new population and new samples. I clicked on the button and got a new page that I then saved so that it would be available, as a static page, for us to review. The page is at Saved Example.

That page starts with a confirmation of the desired population parameters and the listing of the population values. Figure 10 shows the parameters and first 20 values.

Figure 11 shows the end of the population values and a statement that we indeed have met the expectations.

The histogram of the population confirms the normal distribution characteristic.

Then, in Figure 13, we see mean and standard deviation of the first 30 of the 1000 samples, each of size 25.

After the listing of the 1000 samples, we find in Figure 14 that the report on the samples. One thing to note here is how close the actual standard deviation of the sample means is to the predicted value.

The histogram of the 1000 sample means confirms the normal distribution of the sample means.

Figure 16 shows the start of the listing of the

The highlighted right columns show the construction of the

For each sample the table shows the sample mean in the second column, the sample standard deviation in the sixth column, the

There is a lot to learn from the information in that table. First, unlike the confidence intervals on the left where the margin of error is always the same, each of the confidence intervals on the right have different values for the

For sample #453, if we know the value of

In sample #455 the sample mean is so low that both confidence intervals miss the true

In sample #458 the sample standard deviation is so large that even though the sample has a low mean, the confidence interval constructed using

At the end of the table of confidence intervals the web page provides the information shown in Figure 18.

From that we learn that 49 of the 1000 confidence intervals generated using

- From the
**confidence level**compute the value of using - Use
**qt()**to find the associated**t-score**,**t**_{α/2} - Find the
**margin of error**as - Find the two parts to the
**confidence interval**by evaluating

ci_unknown <- function( s=1, n=30, x_bar=0, cl=0.95) { # try to avoid some common errors if( cl <=0 | cl>=1) {return("Confidence interval must be strictly between 0.0 and 1") } if( s < 0 ) {return("Sample standard deviation must be positive")} if( n <= 1 ) {return("Sample size needs to be more than 1")} if( as.integer(n) != n ) {return("Sample size must be a whole number")} # to get here we have some "reasonable" values samp_sd <- s/sqrt(n) t <- abs( qt( (1-cl)/2, n-1)) moe <- t*samp_sd low_end <- x_bar - moe high_end <- x_bar + moe result <- c(low_end, high_end, moe, samp_sd) names(result)<-c("CI Low","CI High", "MOE", "Std Error") return( result ) }This does all of our tasks, including returning the confidence interval as well as some other values. The file of this function is available from ci_unknown.R.

We can try out the new function with the statement

To reconstruct the

©Roger M. Palay Saline, MI 48176 January, 2016