SOCR EduMaterials Activities Histogram Graphs

From Socr

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
== Summary ==
== Summary ==
-
This is an exploratory data analysis SOCR activity that illustrates the generation and interpretation of the histogram of quantitative data. The [http://en.wikipedia.org/wiki/Histogram complete details about histograms can be found here]. In a nutshell, a histogram of a dataset is a graphical visualization of tabulated frequencies or counts of data within equispaced partition of the range of the data. A histogram shows what proportion of measurements that fall into each of the categories defined by the partition of the data range space.
+
This is an exploratory data analysis SOCR activity that illustrates the generation and interpretation of the histogram of quantitative data. The [http://en.wikipedia.org/wiki/Histogram complete details about histograms can be found here]. In a nutshell, a histogram of a dataset is a graphical visualization of tabulated frequencies or counts of data within equispaced partition of the [http://en.wikipedia.org/wiki/Range_(statistics) range of the data]. A histogram shows what proportion of measurements that fall into each of the categories defined by the partition of the [http://en.wikipedia.org/wiki/Range_(statistics) data range] space.
==Exercises==
==Exercises==
=== '''Exercise 1''': Simple Histogram from Raw Data===
=== '''Exercise 1''': Simple Histogram from Raw Data===
* This exercise demonstrates the construction of a histogram plot from raw quantitative data.
* This exercise demonstrates the construction of a histogram plot from raw quantitative data.
-
 
* First, point your browser to [http://www.socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] and select the '''HistogramChartDemo''' (under BarCharts --> XYChart). There are three different ways to select data for this histogram chart:
* First, point your browser to [http://www.socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] and select the '''HistogramChartDemo''' (under BarCharts --> XYChart). There are three different ways to select data for this histogram chart:
** Use the default data provided for this chart ('''DEMO''' button);
** Use the default data provided for this chart ('''DEMO''' button);
** Enter your own data. This can be done by copying to the mouse buffer data from external spreadsheet/table, clicking on the top-left cell in the SOCR Histogram Data table and pasting ('''Paste''' button) the data into the histogram data table. Remember to '''MAP''' the data - this indicates what columns rows, parts of the data need to be used in teh histogram calculations. Then you click '''UPDATE''' chart to have the new graph drawn in the '''Graph''' tab-pane;
** Enter your own data. This can be done by copying to the mouse buffer data from external spreadsheet/table, clicking on the top-left cell in the SOCR Histogram Data table and pasting ('''Paste''' button) the data into the histogram data table. Remember to '''MAP''' the data - this indicates what columns rows, parts of the data need to be used in teh histogram calculations. Then you click '''UPDATE''' chart to have the new graph drawn in the '''Graph''' tab-pane;
-
** Obtain SOCR simulated data from the '''Data-Generation''' tab of the [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] ([[SOCR_EduMaterials_Activities_PowerTransformFamily_Graphs | an example is shown here]]).  
+
** Obtain SOCR simulated data from the '''Data-Generation''' tab of the [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] ([[SOCR_EduMaterials_Activities_PowerTransformFamily_Graphs |an example is shown here]]).  
<center>[[Image:SOCR_Activities_HistogramGraphing_Dinov_061307_Fig1.png|400px]]</center>
<center>[[Image:SOCR_Activities_HistogramGraphing_Dinov_061307_Fig1.png|400px]]</center>
 +
=== '''Exercise 2''': Histogram from Categories and Frequencies===
 +
* Again, point your browser to [http://www.socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts]. This time select the '''HistogramChartDemo3''' chart (under BarCharts --> XYChart). Use the default data provided for this chart ('''DEMO''' button).
 +
* Notice that this time, the chart requires the user to enter the counts/frequencies of observations within each of the range categories (in this default data case, ''year'').
 +
* Try revising some of the numbers in the second (frequency) column and click '''UPDATE''' button to see the effect of these changes on the histogram.
 +
* Remeber that if you enter your own data you need to go to the '''MAP''' tab-pane and select the colums that contain your histogram bin and frequency columns.
 +
<center>[[Image:SOCR_Activities_HistogramGraphing_Dinov_061307_Fig2.png|400px]]</center>
-
=== '''Exercise 4''': Power Transformation Family in a Time/Index Plot Setting===
+
=== '''Exercise 3''': Histogram from Categories and Frequencies===
* Let’s first get some data: Go to [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] and generate 100 Cauchy Distributed variables. Copy these data in your mouse buffer (CNT-C). Of course, you may use your own data throughout. We choose Cauchy data to demonstrate how the Power Transform Family allows us to normalize data that is far from being Normal-like.
* Let’s first get some data: Go to [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] and generate 100 Cauchy Distributed variables. Copy these data in your mouse buffer (CNT-C). Of course, you may use your own data throughout. We choose Cauchy data to demonstrate how the Power Transform Family allows us to normalize data that is far from being Normal-like.
-
<center>[[Image:SOCR_Activities_PowerTransformGraphing_Dinov_022007_Fig1.jpg|400px]]</center>
+
<center>[[Image:SOCR_Activities_HistogramGraphing_Dinov_061307_Fig3.png|400px]]</center>
* Next, paste (CNT-V) these 100 observations in [http://www.socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] (Line-Charts -> Power Transform Chart). Click '''Update Chart''' to see the index plot of this data in RED!
* Next, paste (CNT-V) these 100 observations in [http://www.socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] (Line-Charts -> Power Transform Chart). Click '''Update Chart''' to see the index plot of this data in RED!

Revision as of 22:34, 13 June 2007

Contents

SOCR Educational Materials - Activities - SOCR Histogram Generation Graphing Activity

Summary

This is an exploratory data analysis SOCR activity that illustrates the generation and interpretation of the histogram of quantitative data. The complete details about histograms can be found here. In a nutshell, a histogram of a dataset is a graphical visualization of tabulated frequencies or counts of data within equispaced partition of the range of the data. A histogram shows what proportion of measurements that fall into each of the categories defined by the partition of the data range space.

Exercises

Exercise 1: Simple Histogram from Raw Data

  • This exercise demonstrates the construction of a histogram plot from raw quantitative data.
  • First, point your browser to SOCR Charts and select the HistogramChartDemo (under BarCharts --> XYChart). There are three different ways to select data for this histogram chart:
    • Use the default data provided for this chart (DEMO button);
    • Enter your own data. This can be done by copying to the mouse buffer data from external spreadsheet/table, clicking on the top-left cell in the SOCR Histogram Data table and pasting (Paste button) the data into the histogram data table. Remember to MAP the data - this indicates what columns rows, parts of the data need to be used in teh histogram calculations. Then you click UPDATE chart to have the new graph drawn in the Graph tab-pane;
    • Obtain SOCR simulated data from the Data-Generation tab of the SOCR Modeler (an example is shown here).


Exercise 2: Histogram from Categories and Frequencies

  • Again, point your browser to SOCR Charts. This time select the HistogramChartDemo3 chart (under BarCharts --> XYChart). Use the default data provided for this chart (DEMO button).
  • Notice that this time, the chart requires the user to enter the counts/frequencies of observations within each of the range categories (in this default data case, year).
  • Try revising some of the numbers in the second (frequency) column and click UPDATE button to see the effect of these changes on the histogram.
  • Remeber that if you enter your own data you need to go to the MAP tab-pane and select the colums that contain your histogram bin and frequency columns.

Exercise 3: Histogram from Categories and Frequencies

  • Let’s first get some data: Go to SOCR Modeler and generate 100 Cauchy Distributed variables. Copy these data in your mouse buffer (CNT-C). Of course, you may use your own data throughout. We choose Cauchy data to demonstrate how the Power Transform Family allows us to normalize data that is far from being Normal-like.
  • Next, paste (CNT-V) these 100 observations in SOCR Charts (Line-Charts -> Power Transform Chart). Click Update Chart to see the index plot of this data in RED!
  • Now go to the Graph Tab-Pane and choose λ = 0 (the power parameter). Why is λ = 0 the best choice for this data? Try experimenting with different values of λ. Observe the variability in the Graph of the transformed data in Blue (relative to the variability of the native data in Red).
  • Then go back to the Data Tab-Pane and copy in your mouse buffer the transformed data. We will compare how well does Normal distribution fit the histograms of the raw data ( Cauchy distribution) and the transformed data. One can experiment with other powers of λ, as well! In the case of λ = 0, the power transform reduces to a log transform, which is generally a good way to make the histogram of a data set well approximated by a Normal Distribution. In our case, the histogram of the original data is close to Cauchy distribution, which is heavy tailed and far from Normal (Recall that the T(df) distribution provides a 1-parameter homotopy between Cauchy and Normal).
  • Now copy in your mouse buffer the transformed data and paste it in the SOCR Modeler. Check the Estimate Parameters check-box on the top-left. This will allow you to fit a Normal curve to the histogram of the (log) Power Family Transformed Data. You see that Normal Distribution is a great fit to the histogram of the transformed Data. Be sure to check the parameters of the Normal Distribution (these are estimated using least squares and reported in the Results Tab-Pane). In this case, these parameters are: Mean = 0.177, Variance = 1.77, however, these will vary, in general.


  • Questions
    • What is the effect of the width/size of the histogram bin on the shape of the resulting histogram? Would the shape of the histogram change significantly if we alter the bin-size? Does the sample-size play role in this?
    • Would you expect the shape of the sample histogram to look like the shape of the population distribution the data sample came from?



Translate this page:

(default)

Deutsch

Español

Français

Italiano

Português

日本語

България

الامارات العربية المتحدة

Suomi

इस भाषा में

Norge

한국어

中文

繁体中文

Русский

Nederlands

Ελληνικά

Hrvatska

Česká republika

Danmark

Polska

România

Sverige

Personal tools