HyperMath

ChiSqTest

ChiSqTest

Previous topic Next topic No expanding text in this topic  

ChiSqTest

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Tests a sample from a normally distributed population to determine if the hypothesized population variance value should be accepted or rejected.

Syntax

reject, p_value, conf = ChiSqTest(data, var, alpha)

Arguments

Name

Description

 

data

A vector containing sample data.

 

var

The hypothesized population variance.

 

alpha

(optional)

The level of significance for the test, also known as the probability of a Type I error. It must be in the interval (0, 0.5). The default value is 0.05.

Outputs

Name

Description

 

reject

A Boolean value that is true if the hypothesis is to be rejected.

 

p_value

The largest value of alpha for which the hypothesis is to be accepted.

 

conf

A 100(1-alpha)% confidence interval for the population variance.  A two-element vector containing the lower and upper bounds of the interval, respectively.

Example

Test the hypothesis that a population has a variance of 4, based on a sample of [2, 3, 5, 7, 4].

 

Syntax

 

reject, p_value, conf = ChiSqTest([2, 3, 5, 7, 4], 4)

 

Result

 

reject = false

p_value = 0.89625

conf = [1.3282    30.552]