normal_q: Find the Value Such that Some Proportion of Observations Fall...

View source: R/normal_q.R

normal_qR Documentation

Find the Value Such that Some Proportion of Observations Fall Above or Below That Point for a Normal Distribution

Description

This function is one of those chosen through prompts by normal(). If one is looking for the value such that a specificed proportion of observations are expected to fall above or below that value for a distribution that is normal, one can use this function to calculate and visualize that.

Usage

normal_q(q, mu, sigma, type)

Arguments

q

the proportion of interest (a number between 0 and 1)

mu

the mean of the normal distribution

sigma

the standard deviation of the normal distributions

type

whether we are looking for the value with this proportion above it or below it. Options are 'less', 'more', or 'both'. 'both' could be used to find a point with that proportion more extreme than the output value.

Examples


> normal_q(0.8,0,1,'more')
The proportion of observations with a value of -0.841621233572914 or more is 0.8

You can get this result by typing:
  qnorm(1-0.8,0,1)


> normal_q(0.7,0,1,'less')
he proportion of observations with a value of 0.524400512708041 or less is 0.7

You can get this result by typing:
  qnorm(0.7,0,1)

jrpriceUPS/Math160UPS documentation built on April 28, 2024, 12:41 p.m.