Chapter 10 Histogram

10.1 Intro

Histograms are normally used to inspect the distribution of continuous (cardinal, e.g. interval or ratio-level) variables.

10.1.1 Example dataset

This example uses the Rosetta Stats example dataset “pp15” (see Chapter 1 for information about the datasets and Chapter 3 for an explanation of how to load datasets).

10.1.2 Variable(s)

From this dataset, this example uses variable xtcUsePillHigh.

10.2 Input: jamovi

A screenshot placeholder

Figure 10.1: A screenshot placeholder

10.3 Input: R

Use the following command (this requires the rosetta package to be installed, see section 2.2.2, and the example dataset to be stored under name dat, see section 3):

hist(dat$xtcUsePillHigh);

10.4 Input: SPSS GUI

First activate the dat dataset (see 2.3.1).

A screenshot placeholder

Figure 10.2: A screenshot placeholder

10.5 Input: SPSS Syntax

Use the following command (this requires the dat dataset to be the active dataset, see 2.3.1):

GRAPH /HISTOGRAM(NORMAL) = xtcUsePillHigh.

10.6 Output: jamovi

A screenshot placeholder

Figure 10.3: A screenshot placeholder

10.7 Output: R

The produced box plot in R.

Figure 10.4: The produced box plot in R.

10.8 Output: SPSS

A screenshot placeholder

Figure 10.5: A screenshot placeholder

10.9 Read more

If you would like more background on this topic, you can read more in these sources:

References

Navarro, Danielle. 2018. Learning Statistics with R. 0.6 ed. New South Wales, Australia. https://learningstatisticswithr.com/.