Confused with the example students_t_single_sample.cpp
Hi there, I got a problem with the example "students_t_single_sample.cpp". The corresponding document is at: http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/stat_tu... Actally, I am confused with the mathematical logic rather than coding. The document presents a table that shows four hypothesis and tests, I am OK with the frist two, but for the third and the fourth ones: The original text: Hypothesis 3: the sample mean is less than the true mean Test 3: Reject if CDF of t > significance level, cdf(dist, t) > alpha I think p-value should be the integral from t to +Infinite: cdf(complement(dist, t)), So reject Hypothesis 3 when cdf(complement(dist, t)) < alpha, or say cdf(dist, t) > 1-alpha The original text: Hypothesis 4: the sample mean is greater than the true mean Reject if complement of CDF of t > significance level: cdf(complement(dist, t)) > alpha Similarly, the p-value should be the integral from -Infinite to t: cdf(dist, t), so reject Hypothesis 4 when cdf(dist, t) < alpha Is that right? Thanks. Zhiyu Li 2014-01-11 lizy10b
Just to say I haven't forgotten this, will (hopefully!) get to it soon, John.
I got a problem with the example "students_t_single_sample.cpp". The corresponding document is at: http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/stat_tu...
Actally, I am confused with the mathematical logic rather than coding. The document presents a table that shows four hypothesis and tests, I am OK with the frist two, but for the third and the fourth ones:
The original text: Hypothesis 3: the sample mean is less than the true mean Test 3: Reject if CDF of t > significance level, cdf(dist, t) > alpha
I think p-value should be the integral from t to +Infinite: cdf(complement(dist, t)), So reject Hypothesis 3 when cdf(complement(dist, t)) < alpha, or say cdf(dist, t) > 1-alpha
The original text: Hypothesis 4: the sample mean is greater than the true mean Reject if complement of CDF of t > significance level: cdf(complement(dist, t)) > alpha
Similarly, the p-value should be the integral from -Infinite to t: cdf(dist, t), so reject Hypothesis 4 when cdf(dist, t) < alpha
Is that right? Thanks.
Zhiyu Li
2014-01-11
lizy10b
--------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
The original text: Hypothesis 3: the sample mean is less than the true mean Test 3: Reject if CDF of t > significance level, cdf(dist, t) > alpha
I think p-value should be the integral from t to +Infinite: cdf(complement(dist, t)), So reject Hypothesis 3 when cdf(complement(dist, t)) < alpha, or say cdf(dist, t) > 1-alpha
The original text: Hypothesis 4: the sample mean is greater than the true mean Reject if complement of CDF of t > significance level: cdf(complement(dist, t)) > alpha
Similarly, the p-value should be the integral from -Infinite to t: cdf(dist, t), so reject Hypothesis 4 when cdf(dist, t) < alpha
Is that right?
It's been a while since I've done any stats so it took me a while to get my head around everything again, but yes you are quite right! I'll update the docs and examples shortly, please do let me know if you spot anything else, Regards, John.
Dear John Maddock, Thanks very much for your reply. Best regards Zhiyu Li lizy10b@126.com From: John Maddock Date: 2014-01-18 02:02 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Confused with the example students_t_single_sample.cpp
The original text: Hypothesis 3: the sample mean is less than the true mean Test 3: Reject if CDF of t > significance level, cdf(dist, t) > alpha
I think p-value should be the integral from t to +Infinite: cdf(complement(dist, t)), So reject Hypothesis 3 when cdf(complement(dist, t)) < alpha, or say cdf(dist, t) > 1-alpha
The original text: Hypothesis 4: the sample mean is greater than the true mean Reject if complement of CDF of t > significance level: cdf(complement(dist, t)) > alpha
Similarly, the p-value should be the integral from -Infinite to t: cdf(dist, t), so reject Hypothesis 4 when cdf(dist, t) < alpha
Is that right?
It's been a while since I've done any stats so it took me a while to get my head around everything again, but yes you are quite right! I'll update the docs and examples shortly, please do let me know if you spot anything else, Regards, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
John Maddock
-
lizy10b
-
lizy10b@126.com