tpowerg: Power of the One Sample t-Test

Description Usage Arguments Value References Examples

Description

Computes a graph of the power curve of a one sample t-test of mu=mu0 vs mu!=mu0 as shown in Example 8.3.2 on page 492 of the book. This function assumes that X_1,...,X_n is a random sample on X that has a N(mu, sigma^2) distribution. We are testing H_0: mu=mu_0 versus H_1: mu != mu_0, where mu_0 is specified. Thus the likelihood ratio test statistic is

t(X_1,...,X_n)

= √(n)(Xbar - μ_0)/ √((∑(1 -> n)((X_i - Xbar)^2)/(n - 1)))

= (√(n)(Xbar - μ_0)/σ) / (√( ∑(1 -> n)(X_1 - Xbar)^2 / \(σ^2(n-1))))

The hypothesis H_0 is rejected at level α if |t| ≥ t_α / (2,n-1).

See page 492 and Exercise 8.3.5 on page 497 of the book.

Usage

1
tpowerg(mu0, sig, n, alpha = 0.05, byv = 0.1)

Arguments

mu0

Null population mean.

sig

Population standard deviation.

n

Sample size.

alpha

Level of significance.

byv

Increment in sequence for creating mu1.

Value

Vector of powers from power fucntion.

References

Hogg, R. McKean, J. Craig, A (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson

Examples

1
2
tpowerg(50, 10, 25)
tpowerg(50, 10, 25, 0.04, 0.2)

joemckean/mathstat documentation built on May 30, 2019, 2:01 p.m.