stats::meanTest
-- test an
estimate of an expected meanstats::meanTest
(data, m)
returns the
probability that the expected mean of the data is larger than
m
.
stats::meanTest([x1, x2, ..], m <,
distribution>)
x1, x2, .. |
- | the statistical data: arithmetical expressions. |
m |
- | the estimate for the expected mean of the data: an arithmetical expression. |
distribution |
- | either stats::normal or stats::Tdist . The default is the
T-distribution stats::Tdist . |
an arithmetical expression. FAIL
is returned, if the variance of
the data vanishes.
stats::mean
, stats::normal
, stats::stdev
, stats::Tdist
stats::meanTest
computes y =
(X-m)*sqrt(n/v), where X = (x[1] + .. + x[n])/n is the
mean of the data and v = ((x[n]-X)^2 + .. +
(x[n]-X)^2)/(n-1) is the statistical variance.
stats::meanTest
returns stats::Tdist
(y, n-1) or
stats::normal
(y, 0,
1), depending on the chosen distribution.
stats::meanTest
(data, m) is
the probability that mu >= m.10 experiments produced the values 1, -2, 3, -4, 5, -6, 7, -8, 9, 10. There is only a small probability that the expected mean value of the underlying distribution is larger than 5:
>> data := [1, -2, 3, -4, 5, -6, 7, -8, 9, 10]: float(stats::meanTest(data, 5))
0.05756660092
We test the hypothesis ``expected mean >= 5'' again, this time using the normal distribution:
>> float(stats::meanTest(data, 5, stats::normal))
0.04058346176
>> delete data: