SOCR ResamplingSimulation Activity

From SOCR
Jump to: navigation, search

SOCR Educational Materials - Activities - SOCR Resampling, Randomization and Simulation Activity

This activity illustrates the processes of sampling, resampling, similation and randomization using the SOCR Resampling, Randomization and Simulation Webapp. It is implemented in HTML5/JavaScript and should be portable on any computer, operating system and web-browser.

Goals

The aims of this activity are to:

  • Demonstrate the concepts of simulation and data generation
  • Illustrate data resampling on a massive scale
  • Reinforce the concept of resampling and randomization based statistical inference
  • Demonstrate the similarities and differences between parametric-based and resampling-based statistical inference

Background

Random (re)sampling applies stochasticity or randomness in the sampling scheme and reflects what is sampled and what the distribution we sample from is. In parametric-based statistical inference, the random sampling reflects the stochastic nature of selecting observations from the sample space. In contrast, in randomization-based inference (e.g., bootstrapping), the random sampling reflects the resampling and stochastic assignment of units to treatments or groups.

Requirements & usability

A modern web-browser with enabled HTML and JavaScript support is required (mobile devices, tablets and phones should work fine).

  1. Go to the SOCR Resampling/Simulation Webapp.
  2. Test the webapp
  3. Report any constructive and critical feedback
SOCR ResamplingSimulation Activity Fig2.png

Learning Activity

Load the SOCR resampling and randomization webapp in your browser.

You can perform single sample or multiple sample based statistical inference using this resource. Let's take a 2-sample case as a specific example where we are looking for group differences. Follow this protocol to get some simulations/results (both for teaching/learning randomization-based inference, or do do real data analysis):

  • You can either generate random data or copy-paste in your own data. For instance you can generate data using coins/cards, etc., or use one of the SOCR datasets (e.g., Human Heights/Weights)
  • Simulation-Driven Randomization Inference:
  1. To use the Coin-Toss experiment to generate data, click “Binomial Coin Toss
  2. Choose the parameters -- number of coins, probability of Heads, and number of samples (e.g., k=2)
  3. Click “Generate Dataset“ (you can click this button multiple times, notice how the data samples change)
  4. Click “Generate Ransom Samples
  5. Select sample sizes (e.g., 10) and number of repeated samples (e.g., 10,000)
  6. Click the “RUN” button
  7. You can inspect all samples (for the k=2 groups) in the right panel of the webapp (use “Show” button and inspect all the glyphs on the top)
  8. Then select “Test Statistics”, e.g., p-value, and Click “Infer” button
  9. This will automatically open you the “Inference Plot” tab where the randomization distribution (of p-values) is shown and the initial p_o value is drawn on top to show the relation to the resampling-based distribution.
  10. You can always make modifications of your prior choices in the “Control” tab.
  • Data-Driven Randomization Inference:
  1. Back at the Webapp startup screen select the “Use Excel Datasheet” Option
  2. Click the “Reset” button to remove any previous data from the webapp buffer.
  3. Copy-paste data from any data-table, For instance from this Heights/Weights dataset.
  4. Let’s select a set of say 20 Weights and click “Use Selected” (this would represent sample 1). Repeat this selection with another set of 20 Weights.
  5. Click “Proceed”. You should see a summary indicating the sample-sizes of the 2 groups of data you selected
  6. Click “Done” – this will open the “Control” panel
  7. Select sample sizes (e.g., 10) and number of repeated samples (e.g., 10,000)
  8. Click the “RUN” button
  9. You can inspect all samples (for the k=2 groups) in the right panel of the webapp (use “Show” button and inspect all the glyphs on the top)
  10. Then select “Test Statistics”, e.g., p-value, and Click “Infer” button
  11. This will automatically open you the “Inference Plot” tab where the randomization distribution (of p-values) is shown and the initial p_o value is drawn on top to show the relation to the resampling-based distribution.
  12. You can always make modifications of your prior choices in the “Control” tab.
  • Some new features (e.g., data import from WorldBank and other URLs) will be added it the next 2 weeks

Practice experiments

Repeat the protocol above with different (observed or simulated) data, different study designs (e.g., single sample, vs. multiple samples, etc.)

Videos

See also

References




Translate this page:

(default)
Uk flag.gif

Deutsch
De flag.gif

Español
Es flag.gif

Français
Fr flag.gif

Italiano
It flag.gif

Português
Pt flag.gif

日本語
Jp flag.gif

България
Bg flag.gif

الامارات العربية المتحدة
Ae flag.gif

Suomi
Fi flag.gif

इस भाषा में
In flag.gif

Norge
No flag.png

한국어
Kr flag.gif

中文
Cn flag.gif

繁体中文
Cn flag.gif

Русский
Ru flag.gif

Nederlands
Nl flag.gif

Ελληνικά
Gr flag.gif

Hrvatska
Hr flag.gif

Česká republika
Cz flag.gif

Danmark
Dk flag.gif

Polska
Pl flag.png

România
Ro flag.png

Sverige
Se flag.gif