stats::meanTest -- test an
estimate of an expected mean
Introductionstats::meanTest(data, m) returns the
probability that the expected mean of the data is larger than
m.
Call(s)stats::meanTest([x1, x2, ..], m <,
distribution>)
Parametersx1, 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. |
Returnsan arithmetical expression. FAIL is returned, if the variance of
the data vanishes.
Related
Functionsstats::mean, stats::normal, stats::stdev, stats::Tdist
Detailsstats::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.
Example
110 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: