Learn R Programming

tigerstats (version 0.1.6)

SlowGoodness: Chi Square Resampler (One at a Time) for Goodness-of-Fit

Description

An app to illustrate use of the chi-square statistic to test for goodness of fit. The P-value is computed by resampling, and the resamples are done one at a time. A histogram of resampled chi-square statistics is displayed after each resample, and summary information is output to the console.

Usage

SlowGoodness(x,p)

Arguments

x
a one-dimensional table, or a vector of observed counts
p
vector of null probabilities

Value

  • Graphical and numerical output

Examples

Run this code
throws <- c(one=8,two=18,three=11,four=7,five=9,six=7)
if (require(manipulate)) SlowGoodness(throws,p=rep(1/6,6))

Run the code above in your browser using DataLab