normal: Calculate Quantities Relating to Normal Distributions

View source: R/normal.R

normalR Documentation

Calculate Quantities Relating to Normal Distributions

Description

This function prompts you to learn what type of normal computation you plan to do and directs you to the appropriate function. It produces the answer in the form of a sentence and displays a graph to visually inspect that you have computed what you expected.

Usage

normal()

Examples


********************
FINDING PROPORTIONS:
********************

> normal()
Are you calculating a proportion or a value? Possible answers are 'proportion' or 'value'. proportion
Do you have one value or two values? Possible answers are 'one' and 'two'. one
What is the value you are concerned with? -1.5
What is the mean of your distribution? 0
What is the standard deviation of your distribution? 1
Do you want the proportion greater or less? Possible answers are 'greater' and 'less' less
The proportion of observations with a value of -1.5 or more extreme is 0.0668072

You can get this result by typing:
  pnorm(-1.5,0,1)


> normal()
Are you calculating a proportion or a value? Possible answers are 'proportion' or 'value'. proportion
Do you have one value or two values? Possible answers are 'one' and 'two'. one
What is the value you are concerned with? -1.5
What is the mean of your distribution? 0
What is the standard deviation of your distribution? 1
Do you want the proportion greater or less? Possible answers are 'greater' and 'less' greater
The proportion of observations with a value of -1.5 or more extreme is 0.9331928

You can get this result by typing:
  1-pnorm(-1.5,0,1)
  
  
> normal()
Are you calculating a proportion or a value? Possible answers are 'proportion' or 'value'. proportion
Do you have one value or two values? Possible answers are 'one' and 'two'. two
What is the left value? -1.2
What is the right value? -0.8
What is the mean of your distribution? 0
What is the standard deviation of your distribution? 1
The proportion of observations between -1.2 and -0.8 is 0.09678573

You can get this result by typing:
  pnorm(-0.8,0,1)-pnorm(-1.2,0,1)
  
  
  
***************
FINDING VALUES:
***************

> normal()
Are you calculating a proportion or a value? Possible answers are 'proportion' or 'value'. value
What is the proportion you are interested in? 0.8
What is the mean of your distribution? 0
What is the standard deviation of your distribution? 1
Do you want the point that has that proportion less than it or more than it? Possible answers are 'less' or 'more'. 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()
Are you calculating a proportion or a value? Possible answers are 'proportion' or 'value'. value
What is the proportion you are interested in? 0.7
What is the mean of your distribution? 0
What is the standard deviation of your distribution? 1
Do you want the point that has that proportion less than it or more than it? Possible answers are 'less' or 'more'. less
The 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.