Difference between revisions of "SOCR EduMaterials ModelerActivities MixtureModel 1"

From SOCR
Jump to: navigation, search
m
m
Line 1: Line 1:
 
== [[SOCR_EduMaterials_ModelerActivities | SOCR Modeler Activities]] - SOCR Mixture Model Fitting Activity ==
 
== [[SOCR_EduMaterials_ModelerActivities | SOCR Modeler Activities]] - SOCR Mixture Model Fitting Activity ==
  
* [[SOCR_EduMaterials_ModelerActivities_MixtureModel_1 | SOCR Mixture Model Fitting Activity]]
+
== This is a SOCR Activity that demonstrates random sampling and fitting of mixture models to data ==
  
 +
* '''Data Generation''': You typically have investigator-acquired data that you need to fit a model to. In this case we will generate the data by randomly sampling using the SOCR resource. Go to the SOCR [http://socr.stat.ucla.edu/htmls/SOCR_Modeler.html Modeler]  and select the '''Data Generation''' tab from the right panel.
 +
 +
<center>[[Image:SOCR_ModelerActivities_MixtureModelFit_Dinov_011707_Fig1.jpg|400px]]</center>
 +
 +
 +
* '''Exercise 2''': Now we'll learn how to use these Card experimental results to compute expectations, summarize the outcomes of a large numer of experiments and validate these '''random''' simulations with the corresponding theoretical probabilities.
 +
 +
** First, select the [http://socr.stat.ucla.edu/htmls/SOCR_Experiments.html Card-Experiment]. Then we can run 10 (or more) experiments by clicking the <nowiki><RUN></nowiki> Button (<nowiki>>></nowiki>). The output may look like this (recall that the actual cards will be different each time you perform the experiment):
 +
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig4.jpg|300px]]</center>
 +
 +
** Now select with the mouse all outcome values in the eleven columns (recall that the first column is the index of the experiment, the remaining 2xN, in this case 10, columns represent the denomination (1<=Y<=13) and the suit (0<=Z<=3) of the cards in the randomly drawn hand). Save this selection (sky-blue highlight) in your mouse buffer, <nowiki><CNTR>+C, or <APPLE>+C</nowiki>. Open a new browser tab or window, envoke the [http://socr.stat.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] and select the SOCR Area-Chart Demo:
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig5.jpg|300px]]</center>
 +
** Press the <nowiki><CLEAR></nowiki> Button to remove the default data and go to the <nowiki><DATA></nowiki> tab where you will click on the Bottom-Right (empty) cell and hit <nowiki><TAB></nowiki> key to open a new 11-th column. Finally Click on the Top-Left cell and press the <nowiki><PASTE></nowiki> Button to fill in the Card-Experiment results in to the data-table of the Area-Chart
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig9.jpg|300px]]</center>
 +
 +
** Then y ou need to go to the <MAPPING> tab and map the Index column (1) onto '''Series''', and the rest of the columns should be mapped to '''Categories'''. Then click on <Update_Chart> Button and select the <GRAPH> Tab to see the visual depiction of the summary statistics for your results of the Card-Experiment.
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig8.jpg|250px]] [[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig11.jpg|250px]]</center>
 +
 +
** The final result should look like this, where you can clearly identify the proportions, frequencies and distributions of all the denominations and suits of the randomly drawn hands of cards that you did in the Card-Experiment above.
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig7.jpg|300px]]</center>
 +
 +
 +
* '''Exercise 3''': Suppose we need to validate that a coin given to us is '''fair'''. We toss the coin 6 times independently and observe only one Head. If the coin was fair P(Head)=P(Tail)=0.5 and we would expect about 3 Heads and 3 Tails, right? Under these fair coin assumptions what is the ('''theoretical''') probability that only 1 Head is observed in 6 tosses? Use the [http://socr.stat.ucla.edu/htmls/SOCR_Experiments.html Binomial Coin Experiment] to:
 +
** Emprerically compute the odds (chances) of observing one Head in 6 fair-coin-tosses (run 100 experiments and record the number of them that contain exactly 1 Head);
 +
** Emperically estimate the Bias of the coin we have tested. Experiment with tossing 30 coins at a time. You should change the p-value=P(Head), run experiments and pick a value on the X-axis that the emperical distribution (red-histogram) peaks at. Perhaps you want this peak X value to be close to the observed 1-out-of-6 Head-count for the original test of the coin. Explain your findings!
 +
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig2.jpg|300px]]</center>
 +
 +
* '''Exercise 4''': In the SOCR [http://socr.stat.ucla.edu/htmls/SOCR_Experiments.html Ball and Urn Experiment] how does the distribution of the number of red balls (Y) depend on the sampling strategy (with or without replacement)? Do N, R and n also play roles?
 +
** Suppose N=100, n=5, R=30 and you run 1,000 experiments. What proportion of the 1,000 samples had zero or one red balls in them? Record this value.
 +
** Now run the Binomial Coin Experiment with n=5 and p= 0.3. Run the Binomial experiment 1,000 times? What is the proportion of observations that have zero or one head in them? Record this value also. How close is the proportion value you abtained before to this sample proportion value? Is there a reason to expect that these two quantities (coming from two distinct experiments and two different underlying probability models) should be similar? Explain.
 +
 +
<center>[[Image:SOCR_Activities_CardCoinSampling_Dinov_092206_Fig3.jpg|300px]]</center>
  
 
<hr>
 
<hr>

Revision as of 12:13, 17 January 2007

SOCR Modeler Activities - SOCR Mixture Model Fitting Activity

This is a SOCR Activity that demonstrates random sampling and fitting of mixture models to data

  • Data Generation: You typically have investigator-acquired data that you need to fit a model to. In this case we will generate the data by randomly sampling using the SOCR resource. Go to the SOCR Modeler and select the Data Generation tab from the right panel.
SOCR ModelerActivities MixtureModelFit Dinov 011707 Fig1.jpg


  • Exercise 2: Now we'll learn how to use these Card experimental results to compute expectations, summarize the outcomes of a large numer of experiments and validate these random simulations with the corresponding theoretical probabilities.
    • First, select the Card-Experiment. Then we can run 10 (or more) experiments by clicking the <RUN> Button (>>). The output may look like this (recall that the actual cards will be different each time you perform the experiment):
SOCR Activities CardCoinSampling Dinov 092206 Fig4.jpg
    • Now select with the mouse all outcome values in the eleven columns (recall that the first column is the index of the experiment, the remaining 2xN, in this case 10, columns represent the denomination (1<=Y<=13) and the suit (0<=Z<=3) of the cards in the randomly drawn hand). Save this selection (sky-blue highlight) in your mouse buffer, <CNTR>+C, or <APPLE>+C. Open a new browser tab or window, envoke the SOCR Charts and select the SOCR Area-Chart Demo:
SOCR Activities CardCoinSampling Dinov 092206 Fig5.jpg
    • Press the <CLEAR> Button to remove the default data and go to the <DATA> tab where you will click on the Bottom-Right (empty) cell and hit <TAB> key to open a new 11-th column. Finally Click on the Top-Left cell and press the <PASTE> Button to fill in the Card-Experiment results in to the data-table of the Area-Chart
SOCR Activities CardCoinSampling Dinov 092206 Fig9.jpg
    • Then y ou need to go to the <MAPPING> tab and map the Index column (1) onto Series, and the rest of the columns should be mapped to Categories. Then click on <Update_Chart> Button and select the <GRAPH> Tab to see the visual depiction of the summary statistics for your results of the Card-Experiment.
SOCR Activities CardCoinSampling Dinov 092206 Fig8.jpg SOCR Activities CardCoinSampling Dinov 092206 Fig11.jpg
    • The final result should look like this, where you can clearly identify the proportions, frequencies and distributions of all the denominations and suits of the randomly drawn hands of cards that you did in the Card-Experiment above.
Error creating thumbnail: File missing


  • Exercise 3: Suppose we need to validate that a coin given to us is fair. We toss the coin 6 times independently and observe only one Head. If the coin was fair P(Head)=P(Tail)=0.5 and we would expect about 3 Heads and 3 Tails, right? Under these fair coin assumptions what is the (theoretical) probability that only 1 Head is observed in 6 tosses? Use the Binomial Coin Experiment to:
    • Emprerically compute the odds (chances) of observing one Head in 6 fair-coin-tosses (run 100 experiments and record the number of them that contain exactly 1 Head);
    • Emperically estimate the Bias of the coin we have tested. Experiment with tossing 30 coins at a time. You should change the p-value=P(Head), run experiments and pick a value on the X-axis that the emperical distribution (red-histogram) peaks at. Perhaps you want this peak X value to be close to the observed 1-out-of-6 Head-count for the original test of the coin. Explain your findings!
SOCR Activities CardCoinSampling Dinov 092206 Fig2.jpg
  • Exercise 4: In the SOCR Ball and Urn Experiment how does the distribution of the number of red balls (Y) depend on the sampling strategy (with or without replacement)? Do N, R and n also play roles?
    • Suppose N=100, n=5, R=30 and you run 1,000 experiments. What proportion of the 1,000 samples had zero or one red balls in them? Record this value.
    • Now run the Binomial Coin Experiment with n=5 and p= 0.3. Run the Binomial experiment 1,000 times? What is the proportion of observations that have zero or one head in them? Record this value also. How close is the proportion value you abtained before to this sample proportion value? Is there a reason to expect that these two quantities (coming from two distinct experiments and two different underlying probability models) should be similar? Explain.
SOCR Activities CardCoinSampling Dinov 092206 Fig3.jpg



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