User:ASnieckus/StatisticsContent/Learn by doing/Behavior of sample mean

Description of activity and Excel instructions:Behavior of sample mean

Dataset: none

Create 1000 samples of 2-rolls of a dice
Excel uses a random number generation function to create the samples, but it's easy enough to do it with the RANDBETWEEN function in Calc, to generate random number between 1 and 6, with each number having a probability of 1/6.


 * Open Calc with a new worksheet.
 * Enter the formula "=RANDBETWEEN(1,6)" into A1.
 * Copy this formula (grab the cell handle and drag) to all of the cells from A1 to B1000 (creating 2 columns and 1000 rows of integers from 1 to 6).

Each row represents a random sample of size 2 chosen from a population where each outcome, 1 to 6 has an equal probability, p=1/6. Columns A & B represent 1000 samples of size 2.

Each of the 1000 rows represents a sample, so now let's calculate the sample mean for each sample.


 * In cell C1, type the following formula: "=average(A1:B1)".
 * Copy the formula (grab the cell handle and drag) to calculate the average for each of the subsequent rows of data, from C1 to C1000; Calc will automatically adjust the formula to average each row of data.

Column C now contains 1000 sample means, for samples of n=2 (two rolls of a die).

Create a histogram
Create a histogram of the 1000 sample means, ($$\bar{x}$$), to provide a visual display of the sample distribution.

The steps are:
 * 1) Create the bins, specifying the upper value for each bin. (Using intervals of .5 from .5 to 6 is a reasonable choice.)
 * 2) Create the frequency distribution, using the FREQUENCY formula.
 * 3) Create a bar chart of the frequencies, with the bin values serving as categories and removing the space between the bars.

If needed, use the instructions for creating a histogram from the EDA section, to refresh your memory.

Return to the OLI Behavior of sample mean page to complete the interpretive exercises.