20
1 Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK General Procedure Although the exact value of a parameter may be unknown there is often some idea or be unknown, there is often some idea or hypothesis about its true value Arises as a natural consequence of the scientific method (testing theory against observations) Sample results are used in ascertaining the Sample results are used in ascertaining the validity of the hypotheses based on a predetermined criterion

Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

1

Hypothesis Testing: One Sample

ELEC 412PROF. SIRIPONG POTISUK

General Procedure

Although the exact value of a parameter may be unknown there is often some idea or be unknown, there is often some idea or hypothesis about its true valueArises as a natural consequence of the scientific method (testing theory against observations)Sample results are used in ascertaining the Sample results are used in ascertaining the validity of the hypotheses based on a predetermined criterion

Page 2: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

2

General Procedure

The decision-making process can be tied to the notion of a confidence interval previously the notion of a confidence interval previously studied.If the resulting CI does not contain the hypothesized value (i.e. μ0 ) of the population parameter (i.e., μ ), the hypothesis that μ = μ0 should be rejected.jIf μ0 is within the confidence limits, the hypothesis cannot be rejected.Seven steps in classical hypothesis-testing

Page 3: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

3

Step 1: State the Null & Alternative Hypotheses

Specifically state the hypotheses to be tested before samplingbefore samplingAssumption to be tested is the null hypothesisH0: μ = μ0 where μ0 is the hypothesized value of the parameter μThe conclusion accepted contingent on the rejection of H is the alternative hypothesisrejection of H0 is the alternative hypothesisH1: μ ≠ μ0 or H1: μ > μ0 or H1: μ < μ0

Selection of H1 depends on nature of problem

Step 2: Select the Level of Significance

Establish a criterion to reject H0

How large does the difference between x and How large does the difference between x and μ0 need to be in order to believe μ0 not correct?If difference below some predetermined minimum probability level, reject H0

State the level of risk of erroneously rejecting a true H known as the level of significance and a true H0 known as the level of significance and denoted by α Type I error

The costlier for this type of error, the smaller αFail to reject a false H0 Type II error

Page 4: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

4

Step 3: Determine Distribution of Test Statistic

The sample statistic whose value is the basis of the hypothesis-testing decision is called the the hypothesis testing decision is called the test statisticFocus again on the standard normal (z), t, and chi-square (χ2) distributionsSame criteria for choosing the distribution as in CI constructionCI construction

Page 5: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

5

Step 4: Define the Rejection or Critical Region

Involve partitioning of the sampling distribution curve according to the significance levelcurve according to the significance levelThe z-, t- or χ2 -value used in the partitioning is called the critical value of the test – A point at the start or boundary of the rejection regionThe rejection region equals in total area to the level of significance and is specified as being level of significance and is specified as being unlikely to contain the value of the test statistic if H0 is true.

Step 5: State the Decision Rule

A decision rule is a formal statement that clearly states the appropriate conclusion to be clearly states the appropriate conclusion to be reached about the null hypothesis based on the value of the test statisticThe general format:

Reject H0 in favor of H1 if the value of the test statistic falls into the rejection region; test statistic falls into the rejection region; otherwise, fail to reject H0.

Page 6: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

6

Step 6: Make the Necessary Computations

A random sample of items are collectedA random sample of items are collectedThe sample statistic(s) are computedAn estimate of the parameter is calculated

Step 7: Make a Statistical Decision

Make a decision based on the decision rule and the value of the test statisticthe value of the test statisticManagerial decisions vs. Statistical DecisionsStatistical results, although objectively determined, shouldn’t be blindly accepted; others situational factors must be considered (context of the whole problem)(context of the whole problem)Statistical results do not spell out the course of action to take

Page 7: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

7

One-Sample Two-Tailed Tests of Means

A two-tailed test is one that rejects the null hypothesis if the test statistic is significantly higher or lower than the hypothesized value of the population parameterthe population parameter.The rejection region has two parts; the total risk of error in rejecting the hypothesis is evenly distributed in each tail

Classical Two-Tailed Tests when σ is known

If μ0 is not within the CI, , then, assuming a large sample or normal population

nzX σα 2/±

assuming a large sample, or normal population

nzX σμ α 2/0 −<

nzX σμ α 2/0 +>or

2/0

/ ασμ zn

X>

−or 2/

0

/ ασμ zn

X−<

Thus the hypothesized value of μ0 is rejected if

2/0

/ ασμ zZn

X>=

Page 8: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

8

Construction of rejection region with a significant level of .05

Rejection region for a two-tailed test with a significant level of .05

Page 9: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

9

With a level of significance of 0.05, the standardizeddifference between x and μ0 becomes significant at+1.96 or -1.96

Example

The depth setting on a certain drill press is 2inches. One could then hypothesized that theaverage depth of all holes drilled by thisaverage depth of all holes drilled by thismachine is μ = 2 inches. To check this hypothesis (and the accuracy of the depth gauge), a random sample of n = 100 holes drilled by this machine was measured and found to have a sample mean of 2.005 inches with a standard deviation of 0.03 inch. With α = 0.05, can the hypothesis be rejected based on these sample data?

Page 10: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

10

Example: Statistical Process Control

Suppose your summer job includes checking the output of an automatic machine that produces thousands of bolts each hour This machine when thousands of bolts each hour. This machine, when properly adjusted, makes bolts with a mean diameter of 14.00 mm. Bolts that vary too much in either direction aren’t acceptable. It’s known from past experience that the diameters are normally distributed about the population mean with σ = 0.15 mm. If you take a random sample of 6 bolts last hour with diameters: 14.15, 13.85, 13.95, 14.20, 14.30, and 14.35 mm. At the .01 level, does it appear that the machine is properly adjusted?

Page 11: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

11

Classical Two-Tailed Tests when σ is unknown

The correct sampling distribution is the t -distribution if n is 30 or less; otherwise it is distribution if n is 30 or less; otherwise, it is normally distributedIn the computation of the test statistic, an estimated standard error must be use instead of the true standard error. For small n the hypothesized value of μ0 is For small n, the hypothesized value of μ0 is rejected if

1,2/0

/ −>=−

ntTns

μ

Page 12: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

12

Example: Statistical process Control

From the previous example, assume that the σ is unknown. Again, at the .01 level, does it appear that the machine is properly adjusted? that the machine is properly adjusted?

ExampleA pub owner believes his business sells an average of 17 pints of Ale daily. His partner, thinks his estimate is wrong. A random sample of 36 days shows a mean sales of 15 pints and a sample standard deviation of 4 pints. Test the accuracy of the owner’s estimate at the .1 level of significance.

Page 13: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

13

Classical One-Tailed Hypothesis Testing

If the null hypothesis is not tenable, is the true parameter probably higher or lower than the parameter probably higher or lower than the hypothesized value (but not both)?Null hypothesis H0: μ = μ0

Alternative hypothesis is one of the following:H1: μ > μ0 (right-tailed test)

or H1: μ < μ0 (left-tailed test)Sometimes, a null hypothesis is enlarged to include an interval of possible values

Right-Tailed Tests H1: μ > μ0

The rejection region is in the right tail of the li di t ib tisampling distribution

The null hypothesis is rejected only if the value of the sample statistic is significantly higher than the hypothesized value

Decision Rule:

Reject H0 if z > zα or t > tαOtherwise, fail to reject H0

Page 14: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

14

Right-Tailed Tests H1: μ > μ0

The level of significance (α) is the total risk of erroneously rejecting H0 when it’s actually true.y j g 0 y

An area in the right tail is assigned the total risk α

Left-Tailed Tests H1: μ < μ0

The rejection region is in the left tail of the sampling distributionsampling distribution

The null hypothesis is rejected only if the value of the sample statistic is significantly lower than the hypothesized value

Decision Rule:

Reject H0 if z < zα or t < tαOtherwise, fail to reject H0

Page 15: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

15

Left-Tailed Tests H1: μ < μ0

The level of significance (α) is the total risk of erroneously rejecting H0 when it’s actually true.y j g 0 y

An area in the left tail is assigned the total risk α

Rejection region for a left-tailed test at the .05 level of significance

Page 16: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

16

Example

A production supervisor at a chemical company wants to be sure that a can of household cleaner is filled with an average of 16 ounces of product is filled with an average of 16 ounces of product. If the mean volume is significantly less than 16 ounces, customers and regulatory agencies will likely complain, prompting undesirable publicity. The physical size of the can doesn’t allow a mean volume significantly above 16 ounces. A random sample of 36 cans shows a sample mean of 15.7 ounces. Production records show that σ is 0.2 ounce. Use this data to conduct a hypothesis test with 0.01 level of significance.

Page 17: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

17

ExampleA vice president for a large corporation claims that the number of service calls on equipment sold by that corporation is no more than 15 per y p pweek, on the average. To investigate his claim, service records were checked for n = 36 randomly selected weeks, with sample mean 17 and sample variance 9. Does the sample evidence contradict the vice president’s claim at the 5% significance level?the 5% significance level?

Page 18: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

18

Example

Muzzle velocities of eight shells tested with a new type of gunpowder yield a sample mean of 2959 feet per second and a standard deviation of 2959 feet per second and a standard deviation of s = 39.4. The manufacturer claims that the new gunpowder produces an average velocity of no less than 3000 feet per second. Does the sample provide enough evidence to contradict the manufacturer’s claim? Use α = 0.05.

Computing the Type I Error Probability

The type I error probability is called the significance level or the α-error or the significance level, or the α error, or the size of the test

Page 19: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

19

Computing the Type II Error Probability

The type II error probability called the β -errorMust have a specific alternative hypothesis Must have a specific alternative hypothesis (i.e., a specific value of μ ) for calculating β

Page 20: Hypothesis Testing: One Sample - The Citadel, The Military ...faculty.citadel.edu/potisuk/elec412/notes/hypotst1.pdf · Hypothesis Testing: One Sample ELEC 412 PROF. SIRIPONG POTISUK

20

The Power of a Statistical Test

The power is the probability of rejecting the null hypothesis when the alternative hypothesis null hypothesis when the alternative hypothesis is trueThe power is computed as 1−βInterpreted as the probability of correctly rejecting a false null hypothesisStatistical tests are often compared in terms of Statistical tests are often compared in terms of their power properites