|
Wiki Menu
Home
Syllabus
Schedule
Screen Copy
Grader
Pre-Test
Billiards
Induction
Deduction
3 Ladies
3 Prisoners
Arithmetic
Pyramid
Geometric
Keyboard
Binary
8-Bit Adder
Squares
Cubes
Ring Game
Fibonacci
Phyllotaxis
Nim
Staircase
Counting
Flowers
Permutations
Duplications
Coin Flip
Combinations
Pascal's Tree
Texas Poker
Dice Rolls
Candychines
Lottery
Binomial ESP
More Dice
Monty Hall
Birthdays
BlackJack
Slot Machines
Ciphers
Today's Quote
Bell Curve
M&M Sampling
Worm Holes
Doodles
World Tour
CSG
Polys
Fractals
Chaos Game
Eggbrot
| |
M&M Sampling
Life is like a box of chocolates—
you never know what you're going to get.
—Forrest Gump
Mr. Mars claims there are more blue M&Ms than brown M&Ms in a bag of M&Ms.
Today, we test that claim with a random sample.
In statistics, a sample is a set of things or people
chosen to represent the entire population of those things or people.
We saw voting samples predict the results of the last presidential election
when only a small percentage of votes had been counted.
Sampling is a statistical technique used when we cannot count everything
or everyone in a population.
Every 10 years, the U.S. Constitution calls for a census to count everyone in the United States;
but a census is time consuming and costly.
Our federal government would save a lot of money
if it randomly sampled data from the entire population
like the Nielson TV ratings are sampled.
A random sample is a way of choosing data that gives everything or everyone in the population
an equal chance of being included in the sample.
In today' lab, we will take a random sample of M&Ms
and compare our sample to what Mr. Mars claims for all bags of M&Ms.
Here are the percentages claimed by Mr. Mars for all 6 colors of M&Ms:
RED 13%
ORANGE 20%
YELLOW 14%
GREEN 16%
BLUE 24%
BROWN 13%
To test Mr. Mars' claim, we will do a multinomial test called Goodness-Of-Fit.
Multinomial tests, in contrast to binomial tests,
are used by statisticians when they have more than one category of observations.
Because a bag of M&Ms has 6 colors, we have 6 categories of observations to measure.
To perform a Goodness-Of-Fit test, we use a Chi-Square table.
A statistics table, like a Chi-Square table, is a list of expected probabilities.
Two Chi-Square tables are at the bottom of this page.
We will compare our sample to what is expected according to these tables.
Before we use these tables, however, we must compute the Chi-Square Test Statistic.
The Chi-Square Test Statistic is found like this:
- First count your sample M&Ms in each color category.
This is your Observed count.
- Next multiply the expected percentages of each color times each of your observed counts.
This is your Expected count.
- Then find the difference between each Observed count and its Expected count.
- Square each difference to make sure the number is positive.
- Divide by the Expected count.
- Add the results from all the categories together;
- And you have what is called your Chi-Square Test Statistic.
- You are now ready to compare your test statistic to the numbers in the Chi-Square tables.
DIRECTIONS—CHI-SQUARE TEST
For 4 points, do a Chi-Square test with your bag of M&Ms like this:
- Open your sample bag of M&Ms, but do NOT sample them—yet.
- Count the frequency of each color.
- Enter these counts in the mathlet below in the OBSERVED column.
- Click in a TOTALS box to see the total number of M&Ms in your bag.
- Multiply the number of M&Ms in your bag by each of the percentages above.
- Enter the corresponding number of M&Ms in the EXPECTED column.
- Enter the decimal part of the number also.
- Press the ENTER key to compute the corresponding Chi-Square entry.
- After all your cells are filled, click in a TOTALS box and press ENTER.
- Make sure the total in your OBSERVED column equals the total in your EXPECTED column!
- Copy your table to your lab sheet and answer all questions below.
- The TOTAL in the last column is your Chi-Square Test Statistic.
- Compare this number to the numbers on row 5 in Chi-Square Table 1.
- Look on row 5 because 5 is 1 less than 6. That's the way Chi-Square tests work...
- The number 5 is called the degrees of freedom when we have 6 categories.
- The degrees of freedom are always 1 less than the number of categories.
- The numbers at the top of each column tell us the probability that our frequencies are purely by chance.
- Look on row 5. Write down the number for P=.05.
This means that 5% of the time, if your Chi-Square test statistic is greater than this number,
then your bag could have the frequency distribution that it does.
- Look on row 5. Write down the number for P=.01.
This means that 1% of the time, if your Chi-Square test statistic is greater than this number,
then your bag could have the frequency distribution that it does.
- Look on row 5. Write down the number for P=.001.
This means that one in a thousand times,
if your Chi-Square test statistic is greater than this number,
then your bag could have the frequency distribution that it does.
- If our Chi-Square test number is greater than any of the numbers on row 5, then it is likely that your color frequencies are unusual.
- If not, then your color frequencies do not differ significantly from Mr. Mars' frequency claims.
- So was your bag unusual? YES OR NO?
- Now go Chi-Square Table 2 and look on row 5.
- On row 5, find the closest number to your Chi-Square test number. Write it down.
- Write down also the probability number at the top of the column where you found this number.
- This number is the probability that your sample bag has the usual color frequencies.
- For example, if your Chi-Square test number is 3.14,
then 2.67460 is the closest number on row 5.
- The corresponding probability is .750.
- This means that 75% of the time your color frequencies would be no more unusual than they are.
- Write your TOTALS on the board in the group table.
- Did anyone have an unusual distribution of M&Ms?
- Mr. Mars claims that the number of M&Ms in a bag
can be found by multiplying 31 times the number of ounces in a bag.
- Our sample bags weigh 1.69 ounces.
- How many M&Ms should we expect in our sample bags?
- Look at the group totals on the board.
- Does it look like the our group average approximates the number of M&Ms that Mr. Mars claims?
- Do you think that the difference between our group average and the claimed number is significantly unusual?
Histogram
HISTOGRAM
Above is a frequency analyzer or histogram, commonly known as a bar chart.
It will make a histogram out of any data you paste into its text area.
The data displayed is from our ESP experiment where we guessed card suits.
Try it out with a few prices of gasoline around your area.
Pick a width for each bar and a starting point.
Click the BARS button to view the bar graph and descriptive statistics in lower left.
Compare histograms with the same data but different class widths
till you get one you think best describes the data.
DIRECTIONS—BAR CHART
For 3 points, enter data for the color frequencies of your M&M bag like this:
- Erase the previous data in the DATA area on the left.
- For each RED M&M, enter a 1.
- For each ORANGE M&M, enter a 2.
- For each YELLOW M&M, enter a 3.
- For each GREEN M&M, enter a 4.
- For each BLUE m&M, enter a 5.
- For each BROWN M&M, enter a 6.
- Enter 1 for the CLASS WIDTH.
- Enter 1 for the CLASS START.
- Press the BARS button.
- Since this data is nominal, not ordinal, the STATISTICS have no meaning.
- Use a ruler to copy your bar chart to your lab paper.
- Draw your bars with respect to the vertical and horizontal tics on the graph.
- Choose a vertical tic increment that makes bars as tall as the graph area allows.
- For most of our samples, the vertical increment should be 2 4 6 8 10 12 14.
- Label the vertical axis with these increments.
- Label between tics on the horizontal axis: RED ORANGE YELLOW GREEN BLUE BROWN
- If you do not undersand these directions, ask!
|
PieChart
Pie Maker
Above is a pie chart maker.
Use it for pre-classified data
where you already know the frequency of each category.
When you enter data in the text area, be sure to name each class,
or the results will be unpredictable.
And don't use spaces in the class names.
The pie maker is confused easily.
Enter the radius for the pie chart in the PIE SIZE box.
Enter the font size in the FONT SIZE box.
Each time you click the PIE button, the pie chart is randomly colored.
Or you can select colors by entering the slice number in the SLICE box,
and the hexadecimal code for the color in the COLOR box.
To return to random colors, enter the slice number in the SLICE box,
but erase the digits in the COLOR box.
DIRECTIONS—PIE CHART
For 3 points, enter data for the color frequencies of your M&M bag like this:
- Enter the color label in the DATA area on the left side.
- Enter the frequency count of that color next to the color label.
- Be sure to put a space between colors and counts.
- Enter 1 in the SLICE box.
- Enter ff0000, the hexadecimal code for RED in the Color box.
- Press Pie button.
- Enter 2 in the SLICE box.
- Enter ff8800, the hexadecimal code for ORANGE in the Color box.
- Press Pie button.
- Enter 3 in the SLICE box.
- Enter ffff00, the hexadecimal code for YELLOW in the Color box.
- Press Pie button.
- Enter 4 in the SLICE box.
- Enter 00ff00, the hexadecimal code for GREEN in the Color box.
- Press Pie button.
- Enter 5 in the SLICE box.
- Enter 0000ff, the hexadecimal code for BLUE in the Color box.
- Press Pie button.
- Enter 6 in the SLICE box.
- Enter 993333, the hexadecimal code for BROWN in the Color box.
- Press Pie button.
- Use a ruler to copy the pie chart to your lab paper.
- Draw each slice of pie the size of its percentage.
- Use a protractor if you have one.
|
|
Comments:
Comment on this Page
Last Modified 11/18/08 8:31 AM
| Hide Tools
|
Table 1
Chi-Square
Statistics