chi.test: Calculating Chi Squared p-value

Description Usage Arguments Value Author(s) Examples

Description

This function takes as input a numerical vector/obervations x, and a vector of expected probability p then calculate the Chi Squared Statistic based on these information.

Usage

1

Arguments

x

a numeric vector.

p

a vector of proability, vector of uniform probability if it is unspecified

plot

specifies whether or not to make barplot of the observed data and the expectation

Value

Returns the Chi Squared test statistic.

Author(s)

Nguyen Khanh Le Ho

Examples

1
chi.test(cars$speed, p = NULL)

Honguyen14/anything documentation built on May 7, 2019, 4:02 a.m.