Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: When I use proc univariate for hypothesis test...

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-29-2018 12:12 AM

The data comes from the data table: marchflights.sas7bdat (airplane flights and the corresponding weights of "freight" - the variable)

Freight (variable)

Mean=333.95, Standard deviation=98.11. Number of observations=635

Below is the code:

/**Hypothesis Testing**/

proc univariate data=certprep.marchflights mu0 = 333.95;

var freight;

run;

I believe that the t statistic should be much higher than 0.000283,

and the p value should be very low, looking like 0.0040 or something like that, but it is 0.9998

Results are below:

Tests for Location: Mu0=333.95

0.000283 | 0.9998 |

t statistic | p value |

Can the results of the t statistic and the p value actually be correct? I don't think so.

Is there anything I'm missing here? Is there something wrong with the code?

Thank you.

jtflynn33

Accepted Solutions

Solution

02-03-2018
11:04 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jtflynn33

01-29-2018 11:43 AM

I think you're misunderstanding hypothesis testing.

The null hypothesis is that the mean is equal to 333.95. If p<Alpha then you would reject the null hypothesis.

Since the P-value is 1, this means you** fail to reject** the null hypothesis and the mean is not significantly different than 333.95.

Usually you're looking to reject a null hypothesis, in this case you're looking to confirm your null hypothesis.

jtflynn33 wrote:

The data comes from the data table: marchflights.sas7bdat (airplane flights and the corresponding weights of "freight" - the variable)

Freight (variable)

Mean=333.95, Standard deviation=98.11. Number of observations=635

Below is the code:

/**Hypothesis Testing**/

proc univariate data=certprep.marchflights mu0 = 333.95;

var freight;

run;

I believe that the t statistic should be much higher than 0.000283,

and the p value should be very low, looking like 0.0040 or something like that, but it is 0.9998

Results are below:

Tests for Location: Mu0=333.95

0.000283 0.9998 t statistic p value

Can the results of the t statistic and the p value actually be correct? I don't think so.

Is there anything I'm missing here? Is there something wrong with the code?

Thank you.

jtflynn33

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jtflynn33

01-29-2018 07:41 AM

It looks right. If you want p value be small (significant) , then t statistic must be big enough.

t statistic measured the deviation of H0 statistical (when H0 is assuming right) .

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

02-03-2018 11:02 AM

Thanks, your answer really helped me.

Highlighted
## Re: When I use proc univariate for hypothesis testing the t value and p values do not make sense

[ Edited ]
Options

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jtflynn33

01-29-2018 08:24 AM - edited 01-29-2018 08:46 AM

t = (xbar - mu) / (s / sqrt(n))

xbar and mu are both 333.95 (well, xbar probably has a few more decimal places), so t close to zero is correct.

When you have a t close to zero, you have a p value close to 1

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

02-03-2018 11:03 AM

Thanks for your help!!

Solution

02-03-2018
11:04 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jtflynn33

01-29-2018 11:43 AM

I think you're misunderstanding hypothesis testing.

The null hypothesis is that the mean is equal to 333.95. If p<Alpha then you would reject the null hypothesis.

Since the P-value is 1, this means you** fail to reject** the null hypothesis and the mean is not significantly different than 333.95.

Usually you're looking to reject a null hypothesis, in this case you're looking to confirm your null hypothesis.

jtflynn33 wrote:

The data comes from the data table: marchflights.sas7bdat (airplane flights and the corresponding weights of "freight" - the variable)

Freight (variable)

Mean=333.95, Standard deviation=98.11. Number of observations=635

Below is the code:

/**Hypothesis Testing**/

proc univariate data=certprep.marchflights mu0 = 333.95;

var freight;

run;

I believe that the t statistic should be much higher than 0.000283,

and the p value should be very low, looking like 0.0040 or something like that, but it is 0.9998

Results are below:

Tests for Location: Mu0=333.95

0.000283 0.9998 t statistic p value

Can the results of the t statistic and the p value actually be correct? I don't think so.

Is there anything I'm missing here? Is there something wrong with the code?

Thank you.

jtflynn33