qgnorm: Graphical display for a normal distribution, given a...

View source: R/qgnorm.R

qgnormR Documentation

Graphical display for a normal distribution, given a specified tail probability

Description

A function to draw a normal distribution and shade the region(s) defined by the probability argument

Usage

qgnorm(prob, mean = 0, sd = 1, tail = "upper")

Arguments

prob

The tail probability value to define the region to be shaded on the graph and the corresponding quantile to be displayed. note that if tail="two", this probability is halved for display in each tail.

mean

mean is the Distribution Mean

sd

sd is the Distribution Standard Deviation

tail

Area(s) to be shaded on the graph. If "upper", the function returns a graph with the upper tail area shaded and the upper tail probability displayed. If "lower", the function returns a graph with the lower tail area shaded and the lower tail probability displayed. If "two" the function returns a graph with both tails shaded and the specified probability is halved between these two tails. tail="upper" is the default.

Warning

Specifying extremely high or low probabilities may not yield visible shaded areas if the regions are beyond the limits of the X axis scale of the graph.

Note

This function can be very helpful in instructional situations and can replace the "t table" from textbooks.

Author(s)

Bruce Dudek bruce.dudek@albany.edu

Examples


qgnorm(.35,mean=2000,sd=400) #shows upper tail by default
qgnorm(.16,mean=100,sd=15,tail="upper")
qgnorm(.16,mean=100,sd=15,tail="lower")
qgnorm(.975,mean=100,sd=15,tail="lower")
qgnorm(.025,mean=0,sd=1,tail="upper")
#note that pgnormz also yields the std normal
#without mean and sd arguments required#'

bcdudek/bcdstats documentation built on Jan. 3, 2024, 10:09 p.m.