A movie to illustrate the constructions of a normal Quantile-Quantile (QQ) plot.

qq_plot_movie(data = NULL, mu = NULL, sigma = NULL)

Arguments

data

A numeric vector. Data on which to base the QQ plot.

mu, sigma

Numeric scalars. The mean and standard deviation of the normal distribution to which the data data are to be compared. If mu and/or sigma are not supplied then they are estimated from the data.

Value

Nothing is returned, only the animation is produced.

Details

This movie enables the user to scroll forwards and backwards through plots that describe the way in which a (normal) QQ plot is produced. This movie is designed for simple illustrative examples with small numbers of observations, that is, for small length(data). The example below has only 9 observations. In cases where there are many more observations than this the plots will be a bit of a mess!

See also

stat0002movies: general information about the movies.

Examples

# Create the same dataset used in the lecture notes/slides
set.seed(382)
x <- sort(round(rnorm(9, mean = 7.72, sd = 3.57), 2))
qq_plot_movie(data = x, mu = 7.72, sigma = 3.57)