edu.ucla.stat.SOCR.experiments
Class RandomVariableExperiment
java.lang.Object
edu.ucla.stat.SOCR.core.SOCRValueSettable
edu.ucla.stat.SOCR.core.MultiplePartsPanel
edu.ucla.stat.SOCR.core.Experiment
edu.ucla.stat.SOCR.experiments.RandomVariableExperiment
- All Implemented Interfaces:
- IExperiment, IValueSettable, Pluginable, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Runnable, java.util.EventListener, java.util.Observer
public class RandomVariableExperiment
- extends Experiment
This is a basic experiment for simulating the values from a number of
distributions. The true and empirical densities are shown in a graph and
table
Constructor Summary |
RandomVariableExperiment()
This method initializes the experiment, including the toolbar with the
distribution choice, scrollbars and label, and the random variable graph
and table |
Method Summary |
void |
doExperiment()
This method defines the experiment: a value from the selected random
variable is simulated. |
void |
itemStateChanged(java.awt.event.ItemEvent event)
This method handles the choice events for changing the selected
distribution |
void |
reset()
This method resets the experiment, including the record table and the
random variable graph and table |
void |
setDistribution()
This method sets the distribution, after the selected distribution or the
parameters of the distribution have changed |
void |
update()
This method updates the experiment, including the record table, random
variable graph and table |
void |
update(java.util.Observable o,
java.lang.Object arg)
This method handles the scrollbar events for changing the parameters of
the selected distsribution |
Methods inherited from class edu.ucla.stat.SOCR.core.Experiment |
actionPerformed, getAppletInfo, getDisplayPane, getInstance, getName, getOnlineDescription, getResultTable, getStopChoice, getStopFreq, getTime, getUpdateChoice, graphUpdate, initialize, pasteData, resetUpdateCount, run, setShowModelDistribution, setStopFreq, setStopNow, step, stop |
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel |
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getRecordTable, getTextPanel, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, removeToolbar, setApplet, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomVariableExperiment
public RandomVariableExperiment()
- This method initializes the experiment, including the toolbar with the
distribution choice, scrollbars and label, and the random variable graph
and table
doExperiment
public void doExperiment()
- This method defines the experiment: a value from the selected random
variable is simulated.
- Specified by:
doExperiment
in interface IExperiment
- Overrides:
doExperiment
in class Experiment
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
- This method handles the choice events for changing the selected
distribution
- Specified by:
itemStateChanged
in interface java.awt.event.ItemListener
- Overrides:
itemStateChanged
in class Experiment
update
public void update(java.util.Observable o,
java.lang.Object arg)
- This method handles the scrollbar events for changing the parameters of
the selected distsribution
- Specified by:
update
in interface java.util.Observer
- Overrides:
update
in class MultiplePartsPanel
update
public void update()
- This method updates the experiment, including the record table, random
variable graph and table
- Specified by:
update
in interface IExperiment
- Overrides:
update
in class Experiment
reset
public void reset()
- This method resets the experiment, including the record table and the
random variable graph and table
- Specified by:
reset
in interface IExperiment
- Overrides:
reset
in class Experiment
setDistribution
public void setDistribution()
- This method sets the distribution, after the selected distribution or the
parameters of the distribution have changed