Have Fathom Randomly Generate Data

Top  Previous  Next

Getting Started > Getting Data > Have Fathom Randomly Generate Data

If you want to start with simulated rather than real data, you can do that in Fathom fairly easily. This mini-tutorial will illustrate randomly generating a series of coin flips.

In Fathom, all data are stored in an object called the collection.

1.Make a new, empty collection by dragging one from the object shelf at the top of the Fathom window and dropping it in your document.

You get a little icon that represents an empty collection. (The box is empty.)

2.Double-click the box (double-clicking the name would let you rename the collection).

_img9

 

The collection’s inspector appears. You can use this to define attributes and give them formulas. When you have data, you can use the inspector to drag attributes to graphs.

3.Click <new> and type a name for the first attribute (flip). Press Enter or Return on your keyboard.

_img10

The first attribute has been named flip, and the cursor is in place to name the second attribute. Notice that the value cell has a different colored background to show there’s no value in it. You’ll tell Fathom how to generate values with a formula.

4.Double-click the Formula cell for flip.

_img11

You get a formula editor.

5.Type this formula:

                 RandomPick("heads", "tails")

 

6.Press Enter or Return on your keyboard to tell Fathom to accept the formula and close the editor (you can’t do anything else in Fathom when the formula editor is open).

  _img12

Fathom has accepted the formula, but you don’t yet have a value because you don’t have any cases.

7.Select the collection (the empty box icon) by clicking it, and choose Collection | New Cases.
8.Type 10 and press Enter or Return.

_img13

You’ve just created a fair coin and flipped it ten times. You can scroll through your ten flips by clicking the arrows in the bottom-left corner of the inspector.

Choosing Rerandomize from the Collection menu will generate a new set of flips.

_img14

 

Here are a few ideas for where to go from here (some are simple; others require delving into other areas of Fathom Help).

Add a second attribute with the formula runLength(flip) to compute how many heads and tails you get in a row.

Graph your data. (Drag a graph from the shelf and drop an attribute on its horizontal axis. See Beginner Graphing for more detail.)

Look at all of the cases at once in a case table. (Select the box of gold balls and drag a case table into your document. See Work with Case Tables for more detail.)

Add more cases.

Edit the formula to make the coin unfair, for example, randomPick("heads", "tails", "tails", "tails") then see if you get longer or shorter run lengths.

Open the collection by dragging a corner, and change the images of the cases to those of heads and tails of a nickel using formulas in the inspector’s Display panel. (see Change the Appearance of Cases in a Collection.)

Try some of Fathom’s random number generators, which can be found in the formula editor’s list of functions. You can also learn about them by reading the Random Functions section of Help.

See also

Work with Summary Tables

Create Simulations