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

View source: R/pgnorm.R

pgnormR Documentation

Graphical display for a normal distribution, given a specified quantile

Description

A function to draw a normal distribution and shade a region defined by the quantile

Usage

pgnorm(quantile, mean = 0, sd = 1, tail = "upper")

Arguments

quantile

The quantile value (RV value) to be evaluated. Note that quantile should be positive if a two-tailed result is requested.

mean

Arithmetic Mean of the Distribution

sd

Standard Deviation of the Distribution

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. This function will not display two-tailed shaded regions.

Details

pgnorm, pgnormz, qgnormz, and gnorm will display two-tailed shaded regions for normal distributions (and std normal)

Warning

Specifying extremely high or low quantiles may not yield visible shaded areas if the regions are beyond the limits of the X axis scale of the graph.
In addition, probabilities are rounded to five decimal places and will display as zero if below .000005. Use the pnorm function in this case.

Author(s)

Bruce Dudek bruce.dudek@albany.edu

Examples

#shows upper tail by default
pgnorm(2500,mean=2000,sd=400)
pgnorm(115,mean=100,sd=15,tail="upper")
# note that 75.25 is 1.65 sd below the mean)
pgnorm(75.25,mean=100,sd=15,tail="lower")
pgnorm(130,mean=100,sd=15,tail="lower")
# note that pgnormz also yields the std normal without
# mean and sd arguments required
pgnorm(1.96,mean=0,sd=1,tail="upper")


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