Sentry Page Protection

**Statistical Analysis [2-7]**

**One-sided t-test**

A one-sided t-test can be used to test whether the sample mean is significantly

Copy and run the

*larger or smaller*than a hypothesized value.__Example__Copy and run the

**WATER**data set from the yellow box below.The

**WATER**data set contains a list of 100 tap water samples with the corresponding chloride level.

The recommended chloride concentration for tap water is not to exceed 250 mg/L.

The Ministry of Environment in British Columbia collected 100 tap water samples with the goal of testing whether the chloride level from the samples is significantly higher than the recommended concentration.

A one-sample t-test can be used to test the following hypothesis:

H0: µ≤250

H1: µ>250

To perform a one-sided t-test, the (SIDED=) option can be used:

__Example__

Proc ttest Data=Water H0=250 sided=U;

Var Chloride;

Run;

The (SIDED=U) option tests whether the mean is significantly higher than the hypothesized value (i.e. 250).

The following t-value and p-value are generated:

The following t-value and p-value are generated:

The p-value is 0.9929, which fails to reject the null hypothesis that the mean chloride concentration is less than 250 mg/L.

The water is safe for consumption indeed!

**(SIDED=) Option**

There are three values that can be specified for the (SIDED=) option:

- 2: 2-sided test (default)
- U: Upper 1-sided test
- L: Lower 1-sided test

When testing whether the mean is significantly below a specified value, the (SIDED=L) option should be used.

**Exercise**

Copy and run the

**BULBS**data set from the yellow box below:

The BULBS data set contains a list of 50 testing light bulbs and the number of hours they last before burning out.

A fluorescent light bulb has an average lifespan of 8000 hours.

XYZ-branded light bulb claims to have a significantly longer lifespan than 8000 hours.

Perform a one-sample t-test to check if the claim is valid.

*Need some help?*

Fill out my online form.