README.md

This is a package name "binomial" that careate by a student in University of Californai, Berkeley. Please be aware that this function is not yet perfect. Use it at your own risk

binomial

Overview

"binomial" is a minimal R package that provides functions to calculate a random binomial variable.

Motivation

This package has been developed to help user to get all the infomation they need for binomial variable in a very fast and easy way.

Installation

Install the development version from GitHub via the package "devtools":

# development version from GitHub:
install.packages("devtools") 
# install "cointoss"
devtools::install_github("ucb-stat133/cointoss")

Usage

library(binomial)
# default random binomial variable where n = trials and k = success
variable <- bin_choose( n = 5, k = 2)
variable 
#>10

# Calculate the probaility 
binpro = bin_probability(success = 2, trials=5, prob=0.5)
binpro
#> 0.315

# Calculating the binomial distribution
bindist = bin_distribution(trials = 5, prob = 0.5)
bindist

# plot the binomial distribution
bindistrP = plot(bindist)
bindistrP

#  Calculating the binomial cumulative distributioon 
bincumu = bin_cumulative(trials = 5, prob = 0.5)
bincumu

# Plot the binomial cumulative dirtribution
bincumuP = plot(bincumu)
bincumuP

# Listing the variables 
binvar = bin_variable(trials = 10, prob = 0.3)
binvar

# Summary of the variables
binvarsum = summary(binvar)
binvarsum



kyung541/binomial documentation built on May 5, 2019, 12:27 a.m.