pbinomGC: Graphical Calculator for Binomial Curve Probabilities

Description Usage Arguments Value Author(s) Examples

View source: R/pbinomGC.R

Description

Shades desired areas under rectangles of probability histogram for binomial, returns numerical value of the area.

Usage

1
pbinomGC(bound,region="below",size=100,prob=0.5,graph=FALSE)

Arguments

bound

A numerical vector of length 1 or 2, range of shaded rectangles

region

A character string. Default is "below". Possible values are "between" (when boundary consists of two numbers), "below", "above", and "outside" (again when boundary consists of two numbers)

size

Number of trials

prob

Probability of success

graph

produce graph?

Value

Numerical value of probability.

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#This gives P(X <= 6) for binom X with 10 trials, chance of success 0.70 on each trial:
pbinomGC(6,region="below",size=10,prob=0.70)

#This gives P(45 <= X <= 55), where X is binom with 100 trials,
#chance of success on each trial p = 0.50:
pbinomGC(c(45,55),region="between",size=100,prob=0.50)

#This gives P(X >= 7) = P(X > 6), for binom X with 10 trials,
#70% chance of success on each trial
pbinomGC(6,region="above",size=10,prob=0.7)

homerhanumat/tigerstats documentation built on Sept. 27, 2020, 3:21 a.m.