Sample Panel

Top  Previous  Next

Fathom Reference > Inspector Panels > Sample Panel

 

When you sample cases from a collection, the sampled cases go into a new collection, and that new collection has a Sample panel. The default sample consists of ten cases chosen with replacement, and animation is turned on so that gold balls float across the screen from the source of the sample to the sample itself. See Sampling Simulations.

 

Below, each of the options available in the Sample panel are described.

_img340

 

“Animation on” checkbox

When checked, the sampling process will include animation of gold balls from the source collection to the sample collection. All graphs and tables will update continuously during the sampling. All this has the effect of slowing things down very much, a beneficial effect when learning about sampling. Don’t be too quick to turn the animation off—speed is not always a good thing.

“With replacement” checkbox

When this option is checked, the sampling process will be done with replacement, which means that cases may appear in the sample more than once. In most situations, this is the preferred choice.

When sampling is done without replacement, once a case is chosen for the sample, it won’t be chosen again. This means that the number of cases sampled is limited to the number in the source collection.

“Replace existing cases” checkbox

If this is checked, Fathom will empty the sample collection before starting the sampling process. For most simulations, this is the preferred mode.

If this option is not checked, Fathom will not empty the sample collection and will continue to add each sample to the cases already there.

“Collect new sample when source changes” checkbox

The idea here is that you can get Fathom to automatically collect a new sample when anything changes in the source collection. Frequently, the change is driven by a slider that you are dragging or animating. As the slider changes, formulas in the source collection change, and a new sample is drawn. Typically, measures are being collected from the sample collection so that the information about the sample is not lost.

If there are several formulas changing, Fathom collects a new sample for each formula change. Though this is not usually what you want, it also usually doesn’t hurt.

“Cases” field

Edit this value to change the number of cases that the sample collection will sample. If the sampling is without replacement and you make this field larger than the number of cases in the source, it will automatically be set to the number of cases after the sampling is complete.

“Until condition”

Clicking this button shows the formula editor, ready for you to type a true/false expression. Sampling will continue until this expression evaluates to true. Here are some examples:

face = "heads" will continue the sampling until the value of the face attribute for the last sample case is “heads.”

runlength(face) = 2 will sample until two successive values of face are identical.

uniqueValues(coupon) = 5 will sample until there are five cases, each of which has a different value for the attribute coupon.

Note: It is easy to get into a situation in which the sample process does not stop! Press Esc on the computer keyboard.

“Sample More Cases” button

Clicking this button causes a new sample to be taken. Note that there is also a menu command available to do this when the sample collection is selected. Also, if you open a sample collection, there is a Sample More Cases button at the top right of the open collection.