Difference between revisions of "SOCR EduMaterials Activities RNG"

From SOCR
Jump to: navigation, search
Line 2: Line 2:
  
 
=== Summary===
 
=== Summary===
This activity describes the need, the general methods and the SOCR utilities for random number generation and simulation. [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] allows interactive sampling from any [[About_pages_for_SOCR_Distributions | SOCR Distribution]]. This similated data may easily be copied and pasted in different SOCR [http://www.socr.ucla.edu/htmls/SOCR_Analyses.html Analyses] or [http://www.socr.ucla.edu/htmls/SOCR_Charts.html Graphing] tools for further interrogation.
+
This activity describes the need, general methods and SOCR utilities for random number generation and simulation. [http://www.socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler] allows interactive sampling from any [[About_pages_for_SOCR_Distributions | SOCR Distribution]]. This similated data may easily be copied and pasted in different SOCR [http://www.socr.ucla.edu/htmls/SOCR_Analyses.html Analyses] or [http://www.socr.ucla.edu/htmls/SOCR_Charts.html Graphing] tools for further interrogation.
  
 
===Goals===
 
===Goals===
Line 19: Line 19:
 
The answer is simple: We typically need to sample/simulate data from a ''specific process'' and it is not easy to show that a physical phenomena we observe has the same distribution as the process of interest! So, our need of sampling from a specific distribution demands that we ensure the proper characteristics of the sample.
 
The answer is simple: We typically need to sample/simulate data from a ''specific process'' and it is not easy to show that a physical phenomena we observe has the same distribution as the process of interest! So, our need of sampling from a specific distribution demands that we ensure the proper characteristics of the sample.
  
Where does this sampling need come from? Random number generators have several important applications in statistical modeling, computer simulation, cryptography, etc. For example, data collection is often very expensive. Hence, to do appropriate inference on datasets of smaller sizes, we may consider simulating repeatedly from appropriate distributions, instead of using real observations. Another example of why are random number generators so important comes from cryptography. It is a commonly held misconception that every encryption method can be broken. Claude Shannon, Bell Labs, 1948, proved that the [http://en.wikipedia.org/wiki/One-time_pad one-time pad cipher] is unbreakable, provided the secret key is truly random and of length equal or greater than the length of the encoded message.
+
Where does this sampling need come from? Random number generators have several important applications in statistical modeling, computer simulation, cryptography, etc. For example, data collection is often very expensive. Hence, to do appropriate inference on datasets of smaller sizes, we may consider simulating repeatedly from appropriate distributions, instead of using real observations. Another example of why are random number generators so important comes from cryptography. It is a commonly held misconception that every encryption method can be broken. Claude Shannon, Bell Labs, 1948, proved that the [http://en.wikipedia.org/wiki/One-time_pad one-time pad cipher] is unbreakable, provided the secret key is truly random and of length equal or greater than the length of the encoded message. [http://en.wikipedia.org/wiki/Monte_carlo_simulation Monte Carlo simulations] are also based on RNGs and are used for finding numerical solutions to (multi-dimensional) mathematical problems that cannot easily be solved exactly. For example, integration, differentiation, root-finding, etc.
 
 
 
 
  
  
Line 27: Line 25:
 
===Exercises===
 
===Exercises===
  
* The '''SOCR CLT Experiment''': To start the this Experiment, go to [http://www.socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Experiments] and select the SOCR Sampling Distribution CLT Experiment from the drop-down list of experiments in the left panel. The image below shows the interface to this experiment. Notice the main control widgets on this image (boxed in blue and pointed to by arrows). The generic control buttons on the top allow you to do one or multiple steps/runs, stop and reset this experiment. The two tabs in the main frame provide graphical access to the results of the experiment (Histograms and Summaries) or the Distribution selection panel (Distributions). Remember that choosing sample-sizes <= 16 will animate the samples (second graphing row), whereas larger sample-sizes (N>20) will only show the updates of the sampling distributions (bottom two graphing rows).
+
* '''Exercise 1''': To start the this Experiment, go to [http://www.socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Experiments] and select the SOCR Sampling Distribution CLT Experiment from the drop-down list of experiments in the left panel. The image below shows the interface to this experiment. Notice the main control widgets on this image (boxed in blue and pointed to by arrows). The generic control buttons on the top allow you to do one or multiple steps/runs, stop and reset this experiment. The two tabs in the main frame provide graphical access to the results of the experiment (Histograms and Summaries) or the Distribution selection panel (Distributions). Remember that choosing sample-sizes <= 16 will animate the samples (second graphing row), whereas larger sample-sizes (N>20) will only show the updates of the sampling distributions (bottom two graphing rows).
  
 
<center>[[Image:SOCR_Activities_RNG_Dinov_012207_Fig1.jpg|400px]]</center>
 
<center>[[Image:SOCR_Activities_RNG_Dinov_012207_Fig1.jpg|400px]]</center>
 
   
 
   
* '''Experiment 1''': Expand your Experiment panel (right panel) by clicking/dragging the vertical split-pane bar. Choose the two sample sizes for the two statistics to be 10. Press the '''step'''-button a few of times (2-5) to see the experiment run several times. Notice how data is being sampled from the native population (the distribution of the process on the top). For each step, the process of sampling 2 samples of 10 observations will generate 2 sample statistics of the 2 population parameters of interest (these are defaulted to ''mean'' and ''variance''). At each step, you can see the plots of all sample values, as well as the computed sample statistics for each parameter. The sample values are shown on the second row graph, below the distribution of the process, and the two sample statistics are plotted on the bottom two rows. If we run this experiment many times, the bottom two graphs become the histograms of the corresponding sample statistics. If we did this infinitely many times these two graphs become the sampling distributions of the chosen sample statistics (as the observations/measurements are independent within each sample and between samples). Finally, press the '''Refresh Stats Table''' button on the top to see the sample summary statistics for the native population distribution (row 1), last sample (row 2) and the two sampling distributions, in this case mean and variance (rows 3 and 4).
+
 
<center>[[Image:SOCR_Activities_RNG_Dinov_012207_Fig2.jpg|400px]]</center>
+
===Applications===
 +
The RGN background and motivation section clearly described some of the critical scienctific and technological challenges that rely upon the existence of quality RNGs. Here we present the applications of the SOCR RNG's for various interactive activities and demonstrations.
 +
* TBD1
 +
* TBD2
 +
 
  
  

Revision as of 02:00, 6 March 2007

SOCR Educational Materials - Activities - SOCR Random Numner Generation (RNG) Activity

Summary

This activity describes the need, general methods and SOCR utilities for random number generation and simulation. SOCR Modeler allows interactive sampling from any SOCR Distribution. This similated data may easily be copied and pasted in different SOCR Analyses or Graphing tools for further interrogation.

Goals

The aims of this activity are to:

  • motivate the need for robust random number generators
  • illustrate how to use the SOCR random number generators
  • present applications of random number generation

Background & Motivation

How many natural processes or phenomena in real life can you describe that have an exact mathematical close-form description and are completely deterministic? Arrival time to school each day? Motion of the Moon around the Earth? The computer CPU? The Atomic clock? It is an unsattling paradox that all natural phenomena we observe are stochastic in nature. Yet, we do not know how to replicate any of them exactly. There are good computational strategies to approximate natural processes using analytical mathematical models; however, upon careful review one always finds out a deterministic pattern in all purely computationally generated processes.

There are two strategies to generate random numbers. The first one relies on a physical process which is expected to be random. The other uses computational algorithms that produce long sequences of apparently random results, which are in fact determined by a shorter initial seed. Random number generators based on physical processes may be based on random particles' momentum or position or any of the three fundamental physical forces. Examples of such processess are the Atari gaming console (noise from an analog circuits to generate true random numbers), radioactive decay, thermal noise, shot noise and clock drift. A random number generator (RNG) based solely on deterministic computation is referred to pseudo-random number generator. There are various techniques for obtaining computational (pseudo)random numbers. Virtually all RNG's used in pactice are pseudo-RNGs. To distinguish real random numbers from the pseudo-random numbers is a very difficult problem.

If all natural processes are inherently random and at the same time we can not generate ourselves good (non-deterministic) RNG processes why are we even attempting to do that? Wouldn't it be much easier to just use measurements of the natural physical processes?

The answer is simple: We typically need to sample/simulate data from a specific process and it is not easy to show that a physical phenomena we observe has the same distribution as the process of interest! So, our need of sampling from a specific distribution demands that we ensure the proper characteristics of the sample.

Where does this sampling need come from? Random number generators have several important applications in statistical modeling, computer simulation, cryptography, etc. For example, data collection is often very expensive. Hence, to do appropriate inference on datasets of smaller sizes, we may consider simulating repeatedly from appropriate distributions, instead of using real observations. Another example of why are random number generators so important comes from cryptography. It is a commonly held misconception that every encryption method can be broken. Claude Shannon, Bell Labs, 1948, proved that the one-time pad cipher is unbreakable, provided the secret key is truly random and of length equal or greater than the length of the encoded message. Monte Carlo simulations are also based on RNGs and are used for finding numerical solutions to (multi-dimensional) mathematical problems that cannot easily be solved exactly. For example, integration, differentiation, root-finding, etc.


Exercises

  • Exercise 1: To start the this Experiment, go to SOCR Experiments and select the SOCR Sampling Distribution CLT Experiment from the drop-down list of experiments in the left panel. The image below shows the interface to this experiment. Notice the main control widgets on this image (boxed in blue and pointed to by arrows). The generic control buttons on the top allow you to do one or multiple steps/runs, stop and reset this experiment. The two tabs in the main frame provide graphical access to the results of the experiment (Histograms and Summaries) or the Distribution selection panel (Distributions). Remember that choosing sample-sizes <= 16 will animate the samples (second graphing row), whereas larger sample-sizes (N>20) will only show the updates of the sampling distributions (bottom two graphing rows).
400px


Applications

The RGN background and motivation section clearly described some of the critical scienctific and technological challenges that rely upon the existence of quality RNGs. Here we present the applications of the SOCR RNG's for various interactive activities and demonstrations.

  • TBD1
  • TBD2





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