 # “Students” t-test.

## Presentation on theme: "“Students” t-test."— Presentation transcript:

“Students” t-test

Recall: The z-test for means
The Test Statistic

Comments The sampling distribution of this statistic is the standard Normal distribution The replacement of s by s leaves this distribution unchanged only if the sample size n is large.

For small sample sizes:
The sampling distribution of is called “students” t distribution with n –1 degrees of freedom

Properties of Student’s t distribution
Similar to Standard normal distribution Symmetric unimodal Centred at zero Larger spread about zero. The reason for this is the increased variability introduced by replacing s by s. As the sample size increases (degrees of freedom increases) the t distribution approaches the standard normal distribution

t distribution standard normal distribution

The Situation Let x1, x2, x3 , … , xn denote a sample from a normal population with mean m and standard deviation s. Both m and s are unknown. Let we want to test if the mean, m, is equal to some given value m0.

The Test Statistic The sampling distribution of the test statistic is the t distribution with n-1 degrees of freedom

The Alternative Hypothesis HA
The Critical Region ta and ta/2 are critical values under the t distribution with n – 1 degrees of freedom

Critical values for the t-distribution
a or a/2

Critical values for the t-distribution are provided in tables
Critical values for the t-distribution are provided in tables. A link to these tables are given with today’s lecture

Look up a Look up df

Note: the values tabled for df = ∞ are the same values for the standard normal distribution, za

Example Let x1, x2, x3 , x4, x5, x6 denote weight loss from a new diet for n = 6 cases. Assume that x1, x2, x3 , x4, x5, x6 is a sample from a normal population with mean m and standard deviation s. Both m and s are unknown. we want to test: New diet is not effective versus New diet is effective

The Test Statistic The Critical region: Reject if

The Data The summary statistics:

The Critical Region (using a = 0.05)
The Test Statistic The Critical Region (using a = 0.05) Reject if Conclusion: Accept H0:

Confidence Intervals

Confidence Intervals for the mean of a Normal Population, m, using the Standard Normal distribution
Confidence Intervals for the mean of a Normal Population, m, using the t distribution

The Data The summary statistics:

Example Let x1, x2, x3 , x4, x5, x6 denote weight loss from a new diet for n = 6 cases. The Data: The summary statistics:

Confidence Intervals (use a = 0.05)

Statistical Inference
Summary Statistical Inference

Estimation by Confidence Intervals

Confidence Interval for a Proportion

Determination of Sample Size
The sample size that will estimate p with an Error Bound B and level of confidence P = 1 – a is: where: B is the desired Error Bound za/2 is the a/2 critical value for the standard normal distribution p* is some preliminary estimate of p.

Confidence Intervals for the mean of a Normal Population, m

Determination of Sample Size
The sample size that will estimate m with an Error Bound B and level of confidence P = 1 – a is: where: B is the desired Error Bound za/2 is the a/2 critical value for the standard normal distribution s* is some preliminary estimate of s.

Confidence Intervals for the mean of a Normal Population, m, using the t distribution

An important area of statistical inference
Hypothesis Testing An important area of statistical inference

To define a statistical Test we
Choose a statistic (called the test statistic) Divide the range of possible values for the test statistic into two parts The Acceptance Region The Critical Region

To perform a statistical Test we
Collect the data. Compute the value of the test statistic. Make the Decision: If the value of the test statistic is in the Acceptance Region we decide to accept H0 . If the value of the test statistic is in the Critical Region we decide to reject H0 .

Determining the Critical Region
The Critical Region should consist of values of the test statistic that indicate that HA is true. (hence H0 should be rejected). The size of the Critical Region is determined so that the probability of making a type I error, a, is at some pre-determined level. (usually 0.05 or 0.01). This value is called the significance level of the test. Significance level = P[test makes type I error]

To find the Critical Region
Find the sampling distribution of the test statistic when is H0 true. Locate the Critical Region in the tails (either left or right or both) of the sampling distribution of the test statistic when is H0 true. Whether you locate the critical region in the left tail or right tail or both tails depends on which values indicate HA is true. The tails chosen = values indicating HA.

the size of the Critical Region is chosen so that the area over the critical region and under the sampling distribution of the test statistic when is H0 true is the desired level of a =P[type I error] Sampling distribution of test statistic when H0 is true Critical Region - Area = a

The z-test for Proportions
Testing the probability of success in a binomial experiment

Situation A success-failure experiment has been repeated n times
The probability of success p is unknown. We want to test either

The Test Statistic

Critical Region (dependent on HA)
Alternative Hypothesis Critical Region

The z-test for the mean of a Normal population (large samples)

Situation A sample of n is selected from a normal population with mean m (unknown) and standard deviation s. We want to test either

The Test Statistic

Critical Region (dependent on HA)
Alternative Hypothesis Critical Region

The t-test for the mean of a Normal population (small samples)

Situation A sample of n is selected from a normal population with mean m (unknown) and standard deviation s (unknown). We want to test either

The Test Statistic

Critical Region (dependent on HA)
Alternative Hypothesis Critical Region

Testing and Estimation of Variances

Let x1, x2, x3, … xn, denote a sample from a Normal distribution with mean m and standard deviation s (variance s2) The point estimator of the variance s2 is: The point estimator of the standard deviation s is:

Sampling Theory The statistic
has a c2 distribution with n – 1 degrees of freedom

Critical Points of the c2 distribution

Confidence intervals for s2 and s.

Confidence intervals for s2 and s.
It is true that from which we can show and

Hence (1 – a)100% confidence limits for s2 are:
and (1 – a)100% confidence limits for s are:

Example In this example the subject is asked to type his computer password n = 6 times. Each time xi = time to type the password is recorded. The data are tabulated below:

95% confidence limits for the mean m

95% confidence limits for s

Testing Hypotheses for s2 and s.
Suppose we want to test: The test statistic: If H 0 is true the test statistic, U, has a c2 distribution with n – 1 degrees of freedom: Thus we reject H0 if

a/2 a/2 Reject Reject Accept

One-tailed Tests for s2 and s.
Suppose we want to test: The test statistic: We reject H0 if

a Reject Accept

Or suppose we want to test:
The test statistic: We reject H0 if

a Reject Accept

Example The current method for measuring blood alcohol content has the following properties Measurements are Normally distributed Mean m = true blood alcohol content standard deviation 1.2 units A new method is proposed that has the first two properties and it is believed that the measurements will have a smaller standard deviation. We want to collect data to test this hypothesis. The experiment will be to collect n = 10 observations on a case were the true blood alcohol content is 6.0

The data are tabulated below:

To test: The test statistic: We reject H0 if Thus we reject H0 if a = 0.05.

Two sample Tests