Download presentation
Presentation is loading. Please wait.
1
Confidence Intervals
2
(1 – a)100 % Confidence Intervals
1. Mean, m, of a Normal population (s known). 2. Mean, m, of a Normal population (s unknown). 3. Variance, s2, of a Normal population.
3
4. Standard deviation, s, of a Normal population.
5. Success-failure (Bernoulli) probability, p. 6. General parameter, q.
4
An important area of statistical inference
Hypothesis Testing An important area of statistical inference
5
Definition Hypothesis (H)
Statement about the parameters of the population In hypothesis testing there are two hypotheses of interest. The null hypothesis (H0) The alternative hypothesis (HA)
6
Either null hypothesis (H0) is true or the alternative hypothesis (HA) is true. But not both We say that are mutually exclusive and exhaustive.
7
or One has to make a decision
to either to accept null hypothesis (equivalent to rejecting HA) or to reject null hypothesis (equivalent to accepting HA)
8
There are two possible errors that can be made.
Rejecting the null hypothesis when it is true. (type I error) accepting the null hypothesis when it is false (type II error)
9
An analogy – a jury trial
The two possible decisions are Declare the accused innocent. Declare the accused guilty.
10
The null hypothesis (H0) – the accused is innocent
The alternative hypothesis (HA) – the accused is guilty
11
The two possible errors that can be made:
Declaring an innocent person guilty. (type I error) Declaring a guilty person innocent. (type II error) Note: in this case one type of error may be considered more serious
12
Decision Table showing types of Error
H0 is True H0 is False Correct Decision Type II Error Accept H0 Type I Error Correct Decision Reject H0
13
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
14
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 .
15
Example We are interested in determining if a coin is fair. i.e. H0 : p = probability of tossing a head = ½. To test this we will toss the coin n = 10 times. The test statistic is x = the number of heads. This statistic will have a binomial distribution with p = ½ and n = 10 if the null hypothesis is true.
16
Sampling distribution of x when H0 is true
17
Note We would expect the test statistic x to be around 5 if H0 : p = ½ is true. Acceptance Region = {3, 4, 5, 6, 7}. Critical Region = {0, 1, 2, 8, 9, 10}. The reason for the choice of the Acceptance region: Contains the values that we would expect for x if the null hypothesis is true.
18
Definitions: For any statistical testing procedure define
a = P[Rejecting the null hypothesis when it is true] = P[ type I error] b = P[accepting the null hypothesis when it is false] = P[ type II error]
19
In the last example a = P[ type I error] = p(0) + p(1) + p(2) + p(8) + p(9) + p(10) = 0.109, where p(x) are binomial probabilities with p = ½ and n = 10 . b = P[ type II error] = p(3) + p(4) + p(5) + p(6) + p(7), where p(x) are binomial probabilities with p (not equal to ½) and n = 10. Note: these will depend on the value of p.
20
Table: Probability of a Type II error, b vs. p
Note: the magnitude of b increases as p gets closer to ½.
21
The Power function of a Statistical Test
Definition: The Power Function, P(q1, …,qq) of a statistical test is defined as follows: P(q1, …,qq) = P[ test rejects H0] Note: if H0 is true P(q1, …,qq) = P[rejects H0 ] = P[Type I error] = a. if H0 is false P(q1, …,qq) = P[rejects H0 ] = 1- P[Type II error] = 1 - b.
22
Graph of the Power function P(q1, …,qq)
b Power function of ideal test a H0 is false H0 is false q H0 is true
23
Example: n = 10, Critical Region = {0,1,2,8,9,10}
24
Comments: You can control a = P[ type I error] and b = P[ type II error] by widening or narrowing the acceptance region. . Widening the acceptance region decreases a = P[ type I error] but increases b = P[ type II error]. Narrowing the acceptance region increases a = P[ type I error] but decreases b = P[ type II error].
25
Example – Widening the Acceptance Region
Suppose the Acceptance Region includes in addition to its previous values 2 and 8 then a = P[ type I error] = p(0) + p(1) + p(9) + p(10) = 0.021, where again p(x) are binomial probabilities with p = ½ and n = 10 . b = P[ type II error] = p(2) + p(3) + p(4) + p(5) + p(6) + p(7) + p(8). Tabled values of are given on the next page.
26
Table: Probability of a Type II error, b vs. p
Note: Compare these values with the previous definition of the Acceptance Region. They have increased,
27
Example: n = 10, Critical Region = {0,1, 9,10}
28
Example – Narrowing the Acceptance Region
Suppose the original Acceptance Region excludes the values 3 and 7. That is the Acceptance Region is {4,5,6}. Then a = P[ type I error] = p(0) + p(1) + p(2) + p(3) + p(7) + p(8) +p(9) + p(10) = b = P[ type II error] = p(4) + p(5) + p(6) . Tabled values of are given on the next page.
29
Table: Probability of a Type II error, b vs. p
Note: Compare these values with the otiginal definition of the Acceptance Region. They have decreased,
30
Example: n = 10, Critical Region = {0,1,2,3,7,8,9,10}
31
a = 0.344 a = 0.021 a = 0.109 Acceptance Region Acceptance Region
{2,3,4,5,6,7,8}. Acceptance Region {4,5,6}. Acceptance Region {3,4,5,6,7}. a = 0.344 a = 0.021 a = 0.109
32
Example: n = 10 A - Critical Region = {0,1,2,8,9,10} B - Critical Region = {0,1, 9,10} C - Critical Region = {0,1,2,3,7,8,9,10} C A B
33
The Approach in Statistical Testing is:
Set up the Acceptance Region so that a is close to some predetermine value (the usual values are 0.05 or 0.01) The predetermine value of a (0.05 or 0.01) is called the significance level of the test. The significance level (size) of the test is a = P[test makes a type I error]
34
The z-test for the Mean of a Normal Population
We want to test, m, denote the mean of a normal population
35
Estimating m, the mean of a Normal population
The t distribution Estimating m, the mean of a Normal population (s2 unknown) Let x1, … , xn denote a sample from the normal distribution with mean m and variance s2. Both m and s2 are unknown Recall Also
36
Situation Let x1, … , xn denote a sample from the normal distribution with mean m and variance s2. Both m is unknown and s2 is known We want to test H0: m = m 0 (some specified value of m) Against HA:
37
The Data Let x1, x2, x3 , … , xn denote a sample from a normal population with mean m and standard deviation s. Let we want to test if the mean, m, is equal to some given value m0. Obviously if the sample mean is close to m0 the Null Hypothesis should be accepted otherwise the null Hypothesis should be rejected.
38
The Test Statistic To decide to accept or reject the Null Hypothesis (H0) we will use the test statistic If H0 is true we should expect the test statistic z to be close to zero. If H0 is true we should expect the test statistic z to have a standard normal distribution. If HA is true we should expect the test statistic z to be different from zero.
39
The Standard Normal distribution
The sampling distribution of z when H0 is true: The Standard Normal distribution Reject H0 Accept H0
40
The Acceptance region:
Reject H0 Accept H0
41
Acceptance Region Critical Region With this Choice Accept H0 if:
Reject H0 if: With this Choice
42
Summary To Test for a binomial probability m
H0: m = m0 (some specified value of m) Against HA: Decide on a = P[Type I Error] = the significance level of the test (usual choices 0.05 or 0.01)
43
Collect the data Compute the test statistic Make the Decision Accept H0 if: Reject H0 if:
44
Example A manufacturer Glucosamine capsules claims that each capsule contains on the average: 500 mg of glucosamine To test this claim n = 40 capsules were selected and amount of glucosamine (X) measured in each capsule. Summary statistics:
45
We want to test: Manufacturers claim is correct against Manufacturers claim is not correct
46
The Test Statistic
47
The Critical Region and Acceptance Region
Using a = 0.05 za/2 = z0.025 = 1.960 We accept H0 if ≤ z ≤ 1.960 reject H0 if z < or z > 1.960
48
The Decision Since z= -2.75 < -1.960 We reject H0
Conclude: the manufacturer's claim is incorrect:
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.