Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Confidence Intervals and Hypothesis Testing in Statistics: Lecture 17, Study notes of Probability and Statistics

An overview of confidence intervals and hypothesis testing in statistics. It covers the mathematical concepts behind confidence intervals, the calculation of confidence intervals for different scenarios, and the logic of hypothesis tests. Topics include sampling for means with known and unknown population deviations, sampling for differences of means, and sampling for proportions. The document also includes examples and procedures for various statistical tests such as one-sample z test, one-sample t test, matched pairs t test, two-sample t test, one proportion z test, and two proportion z test.

Typology: Study notes

Pre 2010

Uploaded on 07/23/2009

koofers-user-3pr
koofers-user-3pr 🇺🇸

10 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Confidence Intervals and Hypothesis Testing in Statistics: Lecture 17 and more Study notes Probability and Statistics in PDF only on Docsity!

  1. Summary of confidence intervals Informally, a confidence interval gives a likely range for some value. More formally, it is a statement of the form “with a C% probability, the value of interest is between some number A and some other number B.” There are two basic mathematical ideas behind confidence intervals. The first is that when a distribution is normal, an observation is often within a few standard deviations of the mean. The second idea, culminating in the Central Limit Theorem, says that large samples have a standard deviation which goes down by the square root of the sample size.

1.1. Computing confidence intervals.

(1) Identify the desired confidence level C%. (2) Let O be observed value (of the sample). (3) Identify the standard deviation of the relevant (sampling) distribution, call it S. (4) Identify the kind of distribution which is relevant for the problem, z if the standard deviation of the entire population is known or t if you only know the deviation of your sample. (5) Look up the critical value associated to the confidence level C%. Call this critical value v∗. (6) The margin of error for the observation is v∗^ × S. In each setting one can work backwards from this equation to determine how large a sample is needed or what level of confidence is needed to result in a desired margin of error. (7) The confidence interval says that with C% probability the value of interest is between O − (v∗^ × S) and O + (v∗^ × S).

1.2. Instances of confidence intervals.

  • Sampling for a mean when the deviation over the entire population, σ, is known:
    • The observed value, the mean of the sample, is denoted ¯x.
    • The deviation for the a sample of size n is √σn.
    • The relevant distribution is a z-distribution.
    • Look up the critical value z∗^ in the last row of Table C.
  • Sampling for a mean when only the deviation of the sample is known.
    • The observed value, the mean of the sample, is denoted ¯x.
    • The deviation for the a sample of size n is √sn , where s is the deviation of the sample (a.k.a. the standard error).
    • The relevant distribution is a t(n − 1)-distribution. (One must be careful that the sample data is either large or close to normal).
    • Look up the critical value t∗^ in the appropriate row of Table C.
  • Sampling for a difference of means between two distributions (when only the deviations of the samples are known). - The observed value is the difference of the observed means ¯x 1 − x¯ 2. - The deviation is

s 12 n 1 +^

s 22 n 2 , where the first sample has size^ n^1 and deviation^ s^1 and the second sample has size n 2 and deviation s 2. 1

  • The relevant distribution is a t(N ) distribution, where N is the smaller of n 1 − 1 and n 2 − 1. (One must be careful that the sample data is either large or close to normal).
  • Look up the critical value t∗^ in the appropriate row of Table C.
  • Sampling for a proportion.
  • The observed value is the proportion of positive (Yes) responses in the survey, ˆp.
  • The deviation for a sample of size n is

p¯(1−¯p) n , where ¯p^ is the proportion assuming four more responses, two of which are positive. (This is “plus four” method, needed almost always).

  • The relevant distribution is the standard, normal z distribution.
  • Look up the critical z∗^ value in the last row of Table C.
  • Sampling for a difference of proportions. Only in use with large samples.
  • The observed value is the difference of proportions of positive responses between two popula- tions being surveyed, ˆp 1 − pˆ 2.
  • The deviation is (^) √ p ˆ 1 (1 − pˆ 1 ) n 1

+

pˆ 2 (1 − pˆ 2 ) n 2

.

  • The relevant distribution is the standard, normal z distribution.
  • Look up the critical z∗^ value in the last row of Table C.
    1. Summary of hypothesis testing The logic of hypothesis tests is trickier. A good example to keep in mind is “what would you think if you flipped a coin twenty times and it came up heads each time?” You would think that the coin is not a standard (50-50 chance of Heads-Tails) coin! Here a null-hypothesis, that the coin is fair, and an observation, of twenty heads, are at odds. The probability of getting twenty heads in a row assuming a fair coin is less than one in a million! The fact that we saw twenty heads in a row thus gives evidence against the hypothesis that the coin is fair, and thus for the alternative hypothesis that the coin is biased (to give more heads). In abstract language, one has a null hypothesis A and an observation B. If the probability of B assuming A (the P-value) is very small, this gives evidence against A and thus for alternatives. If this P-value is not small, the test is inconclusive - you can neither refute A nor can you accept A. The computation of a P-value is ultimately very similar to the kinds of probabilities on normal distributions we did in the first half of the class.

2.1. Computing hypothesis tests.

(1) Identify the null and alternative hypotheses. (2) Let O be observed value (of the sample). (3) Identify the standard deviation of the relevant (sampling) distribution, call it S. (4) Identify the kind of distribution which is relevant for the problem, z if the standard deviation of the entire population is known or t if you only know the deviation of your sample. (5) Compute the standardized variable t or z = O−SH , which measures how many deviations away O is from the value H predicted by the null hypothesis. (6) If the distribution is normal, use Table A to calculate the probability of observing a value less than a negative z or bigger than a positive z. (7) If a t-statistic is needed, work “backwards” from Table C to find the probability of observing a value less than a negative t (by first converting a negative to a positive) or greater than a positive t. (8) This probability is equal to the probability of observing something less than/ bigger than O assuming the null hypothesis. It is called the P -value.

(9) If the P -value is less than α, we say the null-hypothesis has been rejected (and thus the alternative hypothesis accepted) at level α. If the P -value is not less than our desired α we say the test is inconclusive.

2.2. Instances of hypothesis testing.

  • Hypothesis testing of a mean when the deviation over the entire population, σ, is known:
    • The observed value, the mean of the sample, is denoted ¯x. The hypothesized value is often denoted μ 0.
    • The deviation for the a sample of size n is √σn.
    • The relevant distribution is a z-distribution.
  • Hypothesis testing of a mean when only the deviation of the sample is known.
    • The observed value, the mean of the sample, is denoted ¯x, and the hypothesized value is often denoted μ 0.
    • The deviation for the a sample of size n is √sn , where s is the deviation of the sample (a.k.a. the standard error).
    • The relevant distribution is a t(n − 1)-distribution. (One must be careful that the sample data is either large or close to normal).
  • Hypothesis testing of a difference of means between two distributions (when only the deviations of the samples are known). - The observed value is the difference of the observed means ¯x 1 − ¯x 2. The hypothesized value is usually denoted μ 1 − μ 2 , and is frequently zero. - The deviation is

s 12 n 1 +^

s 22 n 2 , where the first sample has size^ n^1 and deviation^ s^1 and the second sample has size n 2 and deviation s 2.

  • The relevant distribution is a t(N ) distribution, where N is the smaller of n 1 − 1 and n 2 − 1. (One must be careful that the sample data is either large or close to normal).
  • Hypothesis testing of a proportion.
  • The observed value is the proportion of positive (Yes) responses in the survey, ˆp.
  • The deviation for a sample of size n is

p¯(1−¯p) n , where ¯p^ is the proportion assuming four more responses, two of which are positive. (This is “plus four” method, needed almost always).

  • The relevant distribution is the standard, normal z distribution.
  • Hypothesis testing of a difference of proportions.
  • The observed value is the difference of proportions of positive responses between two popula- tions being surveyed, ˆp 1 − pˆ 2.
  • The deviation is

p ˆ(1 − pˆ)

(

1 n 1 +^

1 n 2

)

, where ˆp is the total proportion is positive responses over both samples.

  • The relevant distribution is the normal distribution.
    1. A potpourri of problems

3.1. Problem 1. In the following situations, determine which one of the following statistical procedures is appropriate to analyze the described data. Fill in each blank with the letter of the correct procedure. Procedures: A. one sample z test B. one sample t test C. matched pairs t test D. two sample t test E. one proportion z test

F. two proportion z test Situations: (1) To determine if a new restaurant might be economically viable, a pollster conducts a poll to find out how many people eat out more than once per week. (2) You wish to measure the effectiveness of a placebo treatment. You take volunteers for your experiment, assign half to take a cold-prevention medication (which they don’t know is a placebo) and the other half to do nothing. After 6 months you find out the proportion of each group which says it has had a cold in the last 6 months. (3) A researcher wishes to measure the effect of alcohol on reaction time. She measures the reaction times of 100 subjects with no alcohol, and the same subjects after two drinks. (4) In order to estimate the mean high school GPA of Oregonians, you take a random sample of 500 high school graduates and obtain their GPAs.

3.2. Problem 2. A petroleum company is testing a new blend of gasoline to determine if it results in better gas mileage. They test with 20 identical new automobiles. Each automobile gets 10 gallons of gas and is then driven until it runs out of gasoline. Half of the cars get the new mixture and half get the old mixture. The cars receiving the old mixture went for a mean distance of 278 miles on the ten gallons of gas, with standard deviation 2.09 miles. The cars receiving the new mixture went for a mean distance of 284 miles on the tank of gas, with standard deviation 3.1 miles. (a) Construct a 95% confidence interval for the difference between the mean mileage of cars receiving the new mixture and cars receiving the old mixture. (b) Is there significant evidence at the 0.01 level that the mean miles driven with the new mixtures is larger than the mean miles driven with the old mixture?

3.3. Problem 3. A random sample of 634 Washington state registered voters showed that 437 of them voted in the 2004 presidential election. A random sample of 714 Oregon registered voters showed that 535 of them voted in the same election. You are interested in the effect of voting by mail, and you wish to determine if this is evidence that more Oregonians vote than Washingtonians.

(1) State null and alternative hypotheses as full sentences. (2) Calculate your test statistic. (3) Calculate your P -value. (4) State your conclusion.

3.4. Problem 4. 46 mice were trained to run a maze. After the training period they were divided into two groups of 22 and 24 each. The first group was given water laced with caffeine, and the other was given ordinary water. After one week of this, the rats were timed in the mazes again. Group n Mean maze time Std. Dev. Caffeine 22 178 49 No caffeine 24 164 26 (1) Give a 95% confidence interval for the mean time in the maze for the caffeine treated mice. (2) Give a 95% confidence interval for the mean difference of the time for the caffeine treated mice minus the time for the non-caffeine treated mice.