Chapter 13 Histogram
13.1 Intro
Histograms are normally used to inspect the distribution of continuous (cardinal, e.g. interval or ratio-level) variables.
13.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).
13.1.2 Variable(s)
From this dataset, this example uses variable xtcUsePillHigh
.
13.2 Input: jamovi

Figure 13.1: A screenshot placeholder
13.3 Input: R
Use the following command (this requires the rosetta
package to be installed, see section 2.3.2, and the example dataset to be stored under name dat
, see section 3):
hist(dat$xtcUsePillHigh);
13.4 Input: SPSS GUI
First activate the dat
dataset (see 2.4.1).

Figure 13.2: A screenshot placeholder
13.5 Input: SPSS Syntax
Use the following command (this requires the dat
dataset to be the active dataset, see 2.4.1):
GRAPH /HISTOGRAM(NORMAL) = xtcUsePillHigh.
13.6 Output: jamovi

Figure 13.3: A screenshot placeholder
13.7 Output: R

Figure 13.4: The produced box plot in R.
13.8 Output: SPSS

Figure 13.5: A screenshot placeholder
13.9 Read more
If you would like more background on this topic, you can read more in these sources:
- Discovering Statistics with SPSS (closed access):
- Learning Statistics with R (Navarro 2018): section XXXXXXXXXX, page XXXXXXXXXX (or follow this link for the Bookdown version)