Learn R Programming

Mychisq (version 0.1.3)

gofchisq: Goodness of fit test

Description

This function is the goodness of fit test

Usage

gofchisq(x, p, conf.level = 0.95)

Arguments

x

a vector of observed

p

probability of each group

conf.level

confidence level

Value

output for goodness of fit test

References

Chernoff, H.; Lehmann, E. L.(1954) <doi:10.1214/aoms/1177728726>.

Examples

Run this code
# NOT RUN {
x=c(12,9,10,7,12)
prob=c(1/5,1/5,1/5,1/5,1/5)  #1:1:1:1:1
gofchisq(x=x,p=prob)

# }

Run the code above in your browser using DataLab