# Using NZgrapher for a confidence interval

 We will be using NZgrapher to do the 'data crunching' to 1 - take a random sample, 2 - calculate sample statistics, 3 - produce a comparative box plot 4 - add informal confidence intervals to the box plots.

##### 1) Load the whole population

- Go to NZ Grapher

- Import data - 'paste table'

##### 2) Taking a Sample

The sample is taken from the whole population, and we want to get at least 30 data values for each group, so a sample of say 80 is needed.

'Sample and more' --> Sample with --> add the sample sie of each group

If there is a problem with your sample then 'restore the Data set' and repeat the sampling

##### 3) Greate dot & box plots - Graph type 'Dot plot (and box and whisker)'

on the check boxes ---> boxplot & show summary statistics'

# ##### 4) Discuss... This gives the mean, median, mode etc of your sample.

Remember each time you take a sample from a population the sample statistics (and the graphs) will be different (but similar)

##### 5) Calculate the Informal Confidence Interval.

Using the sample statistics from above, for each group you will need to find the informal confidence interval.

This is the interval within which we can be reasonably sure the actual population median occurs.

The concept of using sample statistice to determine an estimate of the population is the key idea.

In level 3 statistics you will encounter situations where the population is unknown

using NZgrapher 'show informal confidence interval'

Sample Median +/- 1.5 x (Upper quartile - Lower Quartile) / sqrt(of the sample size n)

For the female height example the calculation would be

Lower Informal Confidence Interval limit = 159 - 1.5 x (165 - 152) / √41 = 155.5cm

Upper Informal Confidence Interval limit = 159 + 1.5 x (165 - 152) / √33 = 162.4cm

# ##### 6) Discuss

Now interpret the results.

Do the intervals overlap? or not?

What does this mean?