qgt: Graphical display for the "Student's" t distribution, given a...

View source: R/qgt.R

qgtR Documentation

Graphical display for the "Student's" t distribution, given a specified probability

Description

A function to produce a graph of a "Student's" t distribution with regions shaded according to a specified probability.

Usage

qgt(prob, df = 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.

df

Degrees of freedom for the t distribution. Note that the default is 100.

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.

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


qgt(.05,df=25,tail="upper")
qgt(.01, df=12,tail="lower")
qgt(.90, df=15, tail="lower")
qgt(.01,df=50, tail="two")


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