Next: cumstudrng() Up: MacAnova Help File Previous: cumpoi()   Contents

cumstu()

Usage:
cumstu(x,df [,upper:T or lower:F]), x and df REAL, elements of df > 0
cumstu(x,df,delta [,upper:T or lower:F]), x, df > 0, delta REAL



Keywords: probabilities
cumstu(Val,df) computes P(t <= Val) where t is a Student's t random
variable with df degrees of freedom.  Val and df can be scalars,
vectors, matrices or arrays, but must have the same size and shape if
neither is a scalar.  When both are scalars, the result is a scalar; if
there is a non-scalar argument, the result has the same size and shape
as that argument.

The degrees of freedom must be positive, but not necessarily integral.

cumstu(Val,df,upper:T) and cumstu(Val,df,lower:F) compute upper tail
probabilities P(t >= Val).  The result is mathematically equivalent to 1
- cumstu(Val,df) but may be more accurate for large Val.

Two tailed P values for an observed t statistic Val can be computed with
the macro twotailt(Val,df) or as 2*cumstu(abs(Val),df,upper:T)).

Example:
Compute two-tail P-value of H_0: mu = 10 using sample mean xbar and
standard deviation s from sample of size n:
  Cmd> 2*cumstu(abs(sqrt(n)*(xbar-10)/s), n-1, upper:T) #2-tail P-value

cumstu(Val,df,delta) computes P(t <= Val) where t is a non-central
Student's t random variable with df degrees of freedom and noncentrality
parameter delta.  All three arguments can be scalars, vectors, matrices
or arrays, but any non-scalar arguments must have the same size and
shape which will be the size and shape of the result.

cumstu(Val,df,delta,upper:T) computes the upper tail probability
P(t >= Val).

When Val = (xbar - mu_0)/(s/sqrt(n)) is computed from a random sample of
size n from N(mu_a, sigma^2), delta = sqrt(n)*(mu_a - mu_0)/sigma.

Example:
Compute the power of a one-tail 5% t-test of H_0: mu = 10 vs H_a: mu >
10 when mu = 15:
  Cmd> cumstu(invstu(.05,n-1,upper:T),n-1,sqrt(n)*(15-10)/sigma,upper:T)

See also twotailt(), invstu(), subtopic cumF:"non_central_F", power()
and power2().


Gary Oehlert 2003-01-15