Generate Random Values

Top  Previous  Next

How To... > Work with Collections > Generate Random Values

_img124

Fathom has many built-in functions for generating random values. You can read about them in Random Functions, or in the help pane of the formula editor (open the list of functions, then the list of random functions; click on a specific function and information about it appears in the bottom of the formula editor).

1.Create an attribute in the Cases panel of the collection’s inspector.
2.Double-click the attribute’s formula cell to show the formula editor.

_img125

 

3.Enter a random number function and whatever arguments it requires (if any), and press Enter or Return to accept the formula and close the formula editor.

_img126

 

If no value appears, you probably need to add one or more cases to the collection.

4.Choose Collection | New Cases, specify the number of cases, and click OK.

Tip: You can use functions and existing attributes as arguments in formulas. For example, if you want random numbers from a distribution with a mean and standard deviation of some attribute already in the collection, you can use mean(attributeName) and StdDev(attributeName)as arguments in the randomNormal function.

For more examples of randomly generated data, see Have Fathom Randomly Generate Data, Probability of a Pair, Make a Coin-Flip Simulation, and Simulate Brownian Motion.