Message Boards Message Boards

0
|
5327 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

T-TEST ... how to write?

Posted 9 years ago
POSTED BY: Martin Pavlovec
2 Replies

Thank you :)

POSTED BY: Martin Pavlovec

Dear Martin,

The solution is simply

TTest[data,zaklad,SignificanceLevel->0.05]

to get the p-value or

TTest[data, zaklad, "TestConclusion", SignificanceLevel -> 0.05]

to get the conclusion:

The null hypothesis that the mean of the population is equal to 8 is not rejected at the 5. percent level based on the T test.

For more details please refer to: https://reference.wolfram.com/language/ref/TTest.html

If you want to perform the test yourself, it is required that you count the test statistic and compare it to the quantile of the t-distribution corresponding to the $\alpha =0.5$ critical values.

data = {7.8, 7.9, 9, 7.8, 8, 7.8, 8.5, 8.2, 8.2, 9.3};
zaklad = 8;
hladina = 0.05;
n = Length[data];
mi = Mean[data];
sigma = StandardDeviation[data];
t = (mi - zaklad) Sqrt[n]/sigma;
qt = Quantile[StudentTDistribution[n - 1], 1 - hladina/2];
If[Abs[t] < 
  qt, "No basis to reject the H0: mi=zaklad", "Reject the hypothesis H0: mi=zaklad"]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract