Calculating the Sample Size n: Continuous and Binary Random Variables Continuous Random Variables Usually we have no control over the sample size of a data set. However, if we are able to set the sample size, as in cases where we are taking a survey, it is very helpful to know just how large it should be to provide the most information. Sampling can be very costly in both time and product. Simple telephone surveys will cost approximately $30.00 each, for example, and some sampling requires the destruction of the product. If we go back to our standardizing formula for the sampling distribution for means, we can see that it is possible to solve it for n. If we do this we have ( X ¯ - μ ) in the denominator. n = Z α 2 2 σ 2 ( X ¯ - μ ) 2 = Z α 2 2 σ 2 e 2 Because we have not taken a sample yet we do not know any of the variables in the formula except that we can set Z α to the level of confidence we desire just as we did when determining confidence intervals. If we set a predetermined acceptable error, or tolerance, for the difference between X ¯ and μ, called e in the formula, we are much further in solving for the sample size n. We still do not know the population standard deviation, σ. In practice, a pre-survey is usually done which allows for fine tuning the questionnaire and will give a sample standard deviation that can be used. In other cases, previous information from other surveys may be used for σ in the formula. While crude, this method of determining the sample size may help in reducing cost significantly. It will be the actual data gathered that determines the inferences about the population, so caution in the sample size is appropriate calling for high levels of confidence and small sampling errors. Binary Random Variables What was done in cases when looking for the mean of a distribution can also be done when sampling to determine the population parameter p for proportions. Manipulation of the standardizing formula for proportions gives: n = Z α 2 2 p q e 2 where e = (p′-p), and is the acceptable sampling error, or tolerance, for this application. This will be measured in percentage points. In this case the very object of our search is in the formula, p, and of course q because q =1-p. This result occurs because the binomial distribution is a one parameter distribution. If we know p then we know the mean and the standard deviation. Therefore, p shows up in the standard deviation of the sampling distribution which is where we got this formula. If, in an abundance of caution, we substitute 0.5 for p we will draw the largest required sample size that will provide the level of confidence specified by Zα and the tolerance we have selected. This is true because of all combinations of two fractions that add to one, the largest multiple is when each is 0.5. Without any other information concerning the population parameter p, this is the common practice. This may result in oversampling, but certainly not under sampling, thus, this is a cautious approach. There is an interesting trade-off between the level of confidence and the sample size that shows up here when considering the cost of sampling. shows the appropriate sample size at different levels of confidence and different level of the acceptable error, or tolerance. Required sample size (90%) Required sample size (95%) Tolerance level 1691 2401 2% 752 1067 3% 271 384 5% 68 96 10% This table is designed to show the maximum sample size required at different levels of confidence given an assumed p= 0.5 and q=0.5 as discussed above. The acceptable error, called tolerance in the table, is measured in plus or minus values from the actual proportion. For example, an acceptable error of 5% means that if the sample proportion was found to be 26 percent, the conclusion would be that the actual population proportion is between 21 and 31 percent with a 90 percent level of confidence if a sample of 271 had been taken. Likewise, if the acceptable error was set at 2%, then the population proportion would be between 24 and 28 percent with a 90 percent level of confidence, but would require that the sample size be increased from 271 to 1,691. If we wished a higher level of confidence, we would require a larger sample size. Moving from a 90 percent level of confidence to a 95 percent level at a plus or minus 5% tolerance requires changing the sample size from 271 to 384. A very common sample size often seen reported in political surveys is 384. With the survey results it is frequently stated that the results are good to a plus or minus 5% level of “accuracy”. Suppose a mobile phone company wants to determine the percentage of customers who would upgrade to the latest-version smartphone from their current smartphone. How many customers should the company survey in order to be 90% confident that the estimated (sample) proportion is within three percentage points of the true population proportion of customers who would upgrade to the latest-version smartphone? From the problem, we know that the acceptable error, e , is 0.03 (3%=0.03) and z α 2 z 0.05 = 1.645 because the confidence level is 90%. The acceptable error, e , is the difference between the actual population proportion p , and the sample proportion we expect to get from the sample. However, in order to find n , we need to know the estimated (sample) proportion p ′. Remember that q ′ = 1 – p ′. But, we do not know p ′ yet. Since we multiply p ′ and q ′ together, we make them both equal to 0.5 because p ′ q ′ = (0.5)(0.5) = 0.25 results in the largest possible product. (Try other products: (0.6)(0.4) = 0.24; (0.3)(0.7) = 0.21; (0.2)(0.8) = 0.16 and so on). The largest possible product gives us the largest n . This gives us a large enough sample so that we can be 90% confident that we are within three percentage points of the true population proportion. To calculate the sample size n , use the formula and make the substitutions. n = z 2 p ′ q ′ e 2 gives n = 1.645 2 ( 0.5 ) ( 0.5 ) 0.03 2 = 751.7 Round the answer to the next higher value. The sample size should be 752 smartphone customers in order to be 90% confident that the estimated (sample) proportion is within three percentage points of the true population proportion of all customers who would upgrade their smartphone. Try It Suppose an internet marketing company wants to determine the current percentage of customers who click on ads on their smartphones. How many customers should the company survey in order to be 90% confident that the estimated proportion is within five percentage points of the true population proportion of customers who click on ads on their smartphones? 271 customers should be surveyed.Check the Real Estate section in your local Chapter Review Sometimes researchers know in advance that they want to estimate a population mean within a specific margin of error for a given level of confidence. In that case, solve the relevant confidence interval formula for n to discover the size of the sample that is needed to achieve this goal: n = Z α 2 σ 2 ( x ¯ - μ ) 2 If the random variable is binary then the formula for the appropriate sample size to maintain a particular level of confidence with a specific tolerance level is given by n = Z α 2 pq e 2 Formula Review n = Z 2 σ 2 ( x ¯ - μ ) 2 = the formula used to determine the sample size ( n ) needed to achieve a desired margin of error at a given level of confidence for a continuous random variable n = Z α 2 pq e 2 = the formula used to determine the sample size if the random variable is binary Use the following information to answer the next five exercises: The standard deviation of the weights of elephants is known to be approximately 15 pounds. We wish to construct a 95% confidence interval for the mean weight of newborn elephant calves. Fifty newborn elephants are weighed. The sample mean is 244 pounds. The sample standard deviation is 11 pounds. Identify the following: x - = _____ σ = _____ n = _____ 244 15 50 In words, define the random variables X and X - . Which distribution should you use for this problem? N ( 244 , 15 50 ) Construct a 95% confidence interval for the population mean weight of newborn elephants. State the confidence interval, sketch the graph, and calculate the error bound. What will happen to the confidence interval obtained, if 500 newborn elephants are weighed instead of 50? Why? As the sample size increases, there will be less variability in the mean, so the interval size decreases. Use the following information to answer the next seven exercises: The U.S. Census Bureau conducts a study to determine the time needed to complete the short form. The Bureau surveys 200 people. The sample mean is 8.2 minutes. There is a known standard deviation of 2.2 minutes. The population distribution is assumed to be normal. Identify the following: x - = _____ σ = _____ n = _____ In words, define the random variables X and X - . X is the time in minutes it takes to complete the U.S. Census short form. X - is the mean time it took a sample of 200 people to complete the U.S. Census short form. Which distribution should you use for this problem? Construct a 90% confidence interval for the population mean time to complete the forms. State the confidence interval, sketch the graph, and calculate the error bound. CI: (7.9441, 8.4559) If the Census wants to increase its level of confidence and keep the error bound the same by taking another survey, what changes should it make? If the Census did another survey, kept the error bound the same, and surveyed only 50 people instead of 200, what would happen to the level of confidence? Why? The level of confidence would decrease because decreasing n makes the confidence interval wider, so at the same error bound, the confidence level decreases. Suppose the Census needed to be 98% confident of the population mean length of time. Would the Census have to survey more people? Why or why not? Use the following information to answer the next ten exercises: A sample of 20 heads of lettuce was selected. Assume that the population distribution of head weight is normal. The weight of each head of lettuce was then recorded. The mean weight was 2.2 pounds with a standard deviation of 0.1 pounds. The population standard deviation is known to be 0.2 pounds. Identify the following: x - = ______ σ = ______ n = ______ x - = 2.2 σ = 0.2 n = 20 In words, define the random variable X . In words, define the random variable X - . X - is the mean weight of a sample of 20 heads of lettuce. Which distribution should you use for this problem? Construct a 90% confidence interval for the population mean weight of the heads of lettuce. State the confidence interval, sketch the graph, and calculate the error bound. EBM = 0.07 CI: (2.1264, 2.2736) Construct a 95% confidence interval for the population mean weight of the heads of lettuce. State the confidence interval, sketch the graph, and calculate the error bound. In complete sentences, explain why the confidence interval in is larger than in . The interval is greater because the level of confidence increased. If the only change made in the analysis is a change in confidence level, then all we are doing is changing how much area is being calculated for the normal distribution. Therefore, a larger confidence level results in larger areas and larger intervals. In complete sentences, give an interpretation of what the interval in means. What would happen if 40 heads of lettuce were sampled instead of 20, and the error bound remained the same? The confidence level would increase. What would happen if 40 heads of lettuce were sampled instead of 20, and the confidence level remained the same? Use the following information to answer the next 14 exercises: The mean age for all Foothill College students for a recent Fall term was 33.2. The population standard deviation has been pretty consistent at 15. Suppose that twenty-five Winter students were randomly selected. The mean age for the sample was 30.4. We are interested in the true mean age for Winter Foothill College students. Let X = the age of a Winter Foothill College student. x - = _____ 30.4 n = _____ ________ = 15 σ In words, define the random variable X - . What is x - estimating? μ Is σ x known? As a result of your answer to , state the exact distribution to use when calculating the confidence interval. normal Construct a 95% Confidence Interval for the true mean age of Winter Foothill College students by working out then answering the next seven exercises . How much area is in both tails (combined)? α =________ How much area is in each tail? α 2 =________ 0.025 Identify the following specifications: lower limit upper limit error bound The 95% confidence interval is:__________________. (24.52,36.28) Fill in the blanks on the graph with the areas, upper and lower limits of the confidence interval, and the sample mean. In one complete sentence, explain what the interval means. We are 95% confident that the true mean age for Winger Foothill College students is between 24.52 and 36.28. Using the same mean, standard deviation, and level of confidence, suppose that n were 69 instead of 25. Would the error bound become larger or smaller? How do you know? Using the same mean, standard deviation, and sample size, how would the error bound change if the confidence level were reduced to 90%? Why? The error bound for the mean would decrease because as the CL decreases, you need less area under the normal curve (which translates into a smaller interval) to capture the true population mean. Find the value of the sample size needed to be 90% confident that the sample proportion and the population proportion are within 4% of each other. The sample proportion is 0.60. Note: Round all fractions up for n . Find the value of the sample size needed to be 95% confident that the sample proportion and the population proportion are within 2% of each other. The sample proportion is 0.650. Note: Round all fractions up for n . 2,185 Find the value of the sample size needed to be 96% confident that the sample proportion and the population proportion are within 5% of each other. The sample proportion is 0.70. Note: Round all fractions up for n . Find the value of the sample size needed to be 90% confident that the sample proportion and the population proportion are within 1% of each other. The sample proportion is 0.50. Note: Round all fractions up for n . 6,765 Find the value of the sample size needed to be 94% confident that the sample proportion and the population proportion are within 2% of each other. The sample proportion is 0.65. Note: Round all fractions up for n . Find the value of the sample size needed to be 95% confident that the sample proportion and the population proportion are within 4% of each other. The sample proportion is 0.45. Note: Round all fractions up for n . 595 Find the value of the sample size needed to be 90% confident that the sample proportion and the population proportion are within 2% of each other. The sample proportion is 0.3. Note: Round all fractions up for n . Homework Among various ethnic groups, the standard deviation of heights is known to be approximately three inches. We wish to construct a 95% confidence interval for the mean height of male Swedes. Forty-eight male Swedes are surveyed. The sample mean is 71 inches. The sample standard deviation is 2.8 inches. x - =________ σ =________ n =________ In words, define the random variables X and X - . Which distribution should you use for this problem? Explain your choice. Construct a 95% confidence interval for the population mean height of male Swedes. State the confidence interval. Sketch the graph. What will happen to the level of confidence obtained if 1,000 male Swedes are surveyed instead of 48? Why? 71 2.8 48 X is the height of a male Swede, and x _ is the mean height from a sample of 48 male Swedes. Normal. We know the standard deviation for the population, and the sample size is greater than 30. CI: (70.151, 71.85) The confidence interval will decrease in size, because the sample size increased. Recall, when all factors remain unchanged, an increase in sample size decreases variability. Thus, we do not need as large an interval to capture the true population mean. Announcements for 84 upcoming engineering conferences were randomly picked from a stack of IEEE Spectrum magazines. The mean length of the conferences was 3.94 days, with a standard deviation of 1.28 days. Assume the underlying population is normal. In words, define the random variables X and X - . Which distribution should you use for this problem? Explain your choice. Construct a 95% confidence interval for the population mean length of engineering conferences. State the confidence interval. Sketch the graph. Suppose that an accounting firm does a study to determine the time needed to complete one person’s tax forms. It randomly surveys 100 people. The sample mean is 23.6 hours. There is a known standard deviation of 7.0 hours. The population distribution is assumed to be normal. x - =________ σ =________ n =________ In words, define the random variables X and X – . Which distribution should you use for this problem? Explain your choice. Construct a 90% confidence interval for the population mean time to complete the tax forms. State the confidence interval. Sketch the graph. If the firm wished to increase its level of confidence and keep the error bound the same by taking another survey, what changes should it make? If the firm did another survey, kept the error bound the same, and only surveyed 49 people, what would happen to the level of confidence? Why? Suppose that the firm decided that it needed to be at least 96% confident of the population mean length of time to within one hour. How would the number of people the firm surveys change? Why? x ¯ = 23.6 σ = 7 n = 100 X is the time needed to complete an individual tax form. X ¯ is the mean time to complete tax forms from a sample of 100 customers. N ( 23.6 , 7 100 ) because we know sigma. (22.228, 24.972) It will need to change the sample size. The firm needs to determine what the confidence level should be, then apply the error bound formula to determine the necessary sample size. The confidence level would increase as a result of a larger interval. Smaller sample sizes result in more variability. To capture the true population mean, we need to have a larger interval. According to the error bound formula, the firm needs to survey 206 people. Since we increase the confidence level, we need to increase either our error bound or the sample size. A sample of 16 small bags of the same brand of candies was selected. Assume that the population distribution of bag weights is normal. The weight of each bag was then recorded. The mean weight was two ounces with a standard deviation of 0.12 ounces. The population standard deviation is known to be 0.1 ounce. x – =________ σ =________ s x =________ In words, define the random variable X . In words, define the random variable X - . Which distribution should you use for this problem? Explain your choice. Construct a 90% confidence interval for the population mean weight of the candies. State the confidence interval. Sketch the graph. Construct a 98% confidence interval for the population mean weight of the candies. State the confidence interval. Sketch the graph. Calculate the error bound. In complete sentences, explain why the confidence interval in part f is larger than the confidence interval in part e. In complete sentences, give an interpretation of what the interval in part f means. A camp director is interested in the mean number of letters each child sends during their camp session. The population standard deviation is known to be 2.5. A survey of 20 campers is taken. The mean from the sample is 7.9 with a sample standard deviation of 2.8. x - =________ σ =________ n =________ Define the random variables X and X - in words. Which distribution should you use for this problem? Explain your choice. Construct a 90% confidence interval for the population mean number of letters campers send home. State the confidence interval. Sketch the graph. What will happen to the error bound and confidence interval if 500 campers are surveyed? Why? 7.9 2.5 20 X is the number of letters a single camper will send home. X ¯ is the mean number of letters sent home from a sample of 20 campers. N 7.9 ( 2.5 20 ) CI: (6.98, 8.82) The error bound and confidence interval will decrease. What is meant by the term “90% confident” when constructing a confidence interval for a mean? If we took repeated samples, approximately 90% of the samples would produce the same confidence interval. If we took repeated samples, approximately 90% of the confidence intervals calculated from those samples would contain the sample mean. If we took repeated samples, approximately 90% of the confidence intervals calculated from those samples would contain the true value of the population mean. If we took repeated samples, the sample mean would equal the population mean in approximately 90% of the samples. The Federal Election Commission collects information about campaign contributions and disbursements for candidates and political committees each election cycle. During a certain campaign season, there were 1,619 candidates for the House of Representatives across the United States who received contributions from individuals. shows the total receipts from individuals for a random selection of 40 House candidates rounded to the nearest $100. The standard deviation for this data to the nearest hundred is σ = $909,200. $3,600 $1,243,900 $10,900 $385,200 $581,500 $7,400 $2,900 $400 $3,714,500 $632,500 $391,000 $467,400 $56,800 $5,800 $405,200 $733,200 $8,000 $468,700 $75,200 $41,000 $13,300 $9,500 $953,800 $1,113,500 $1,109,300 $353,900 $986,100 $88,600 $378,200 $13,200 $3,800 $745,100 $5,800 $3,072,100 $1,626,700 $512,900 $2,309,200 $6,600 $202,400 $15,800 Find the point estimate for the population mean. Using 95% confidence, calculate the error bound. Create a 95% confidence interval for the mean total individual contributions. Interpret the confidence interval in the context of the problem. x - = $568,873 CL = 0.95 α = 1 – 0.95 = 0.05 z α 2 = 1.96 EBM = z 0.025 σ n = 1.96 909200 40 = $281,764 x - − EBM = 568,873 − 281,764 = 287,109 x - + EBM = 568,873 + 281,764 = 850,637 We estimate with 95% confidence that the mean amount of contributions received from all individuals by House candidates is between $287,109 and $850,637. The American Community Survey (ACS), part of the United States Census Bureau, conducts a yearly census similar to the one taken every ten years, but with a smaller percentage of participants. The most recent survey estimates with 90% confidence that the mean household income in the U.S. falls between $69,720 and $69,922. Find the point estimate for mean U.S. household income and the error bound for mean U.S. household income. The average height of young adult males has a normal distribution with standard deviation of 2.5 inches. You want to estimate the mean height of students at your college or university to within one inch with 93% confidence. How many male students must you measure? If the confidence interval is change to a higher probability, would this cause a lower, or a higher, minimum sample size? Higher If the tolerance is reduced by half, how would this affect the minimum sample size? It would increase to four times the prior value. If the value of p is reduced, would this necessarily reduce the sample size needed? No, It could have no affect if it were to change to 1 – p , for example. If it gets closer to 0.5 the minimum sample size would increase. Is it acceptable to use a higher sample size than the one calculated by z 2 p q e 2 ? Yes A company has been running an assembly line with 97.42%% of the products made being acceptable. Then, a critical piece broke down. After the repairs the decision was made to see if the number of defective products made was still close enough to the long standing production quality. Samples of 500 pieces were selected at random, and the defective rate was found to be 0.025%. Is this sample size adequate to claim the company is checking within the 90% confidence interval? The 95% confidence interval? No No

Math


Introduction You can use a hypothesis test to decide if a dog breeder’s claim that every Dalmatian has 35 spots is statistically sound. (credit: modification of work “black and white, view, dog, animal, fur, mammal, garden, head, vertebrate, beautiful, elegant, rush, attention, dalmatian, dog breed, dog head, noble, stains, animal portrait, head drawing, spotty, hundeportrait, dalmatians”/ Pxhere, Public Domain) Now we are down to the bread and butter work of the statistician: developing and testing hypotheses. It is important to put this material in a broader context so that the method by which a hypothesis is formed is understood completely. Using textbook examples often clouds the real source of statistical hypotheses. Statistical testing is part of a much larger process known as the scientific method. This method was developed more than two centuries ago as the accepted way that new knowledge could be created. Until then, and unfortunately even today, among some, "knowledge" could be created simply by some authority saying something was so, ipso dicta . Superstition and conspiracy theories were (are?) accepted uncritically. The scientific method, briefly, states that only by following a careful and specific process can some assertion be included in the accepted body of knowledge. This process begins with a set of assumptions upon which a theory, sometimes called a model, is built. This theory, if it has any validity, will lead to predictions; what we call hypotheses. As an example, in Microeconomics the theory of consumer choice begins with certain assumption concerning human behavior. From these assumptions a theory of how consumers make choices using indifference curves and the budget line. This theory gave rise to a very important prediction, namely, that there was an inverse relationship between price and quantity demanded. This relationship was known as the demand curve. The negative slope of the demand curve is really just a prediction, or a hypothesis, that can be tested with statistical tools. Unless hundreds and hundreds of statistical tests of this hypothesis had not confirmed this relationship, the so-called Law of Demand would have been discarded years ago. This is the role of statistics, to test the hypotheses of various theories to determine if they should be admitted into the accepted body of knowledge; how we understand our world. Once admitted, however, they may be later discarded if new theories come along that make better predictions. Not long ago two scientists claimed that they could get more energy out of a process than was put in. This caused a tremendous stir for obvious reasons. They were on the cover of Time and were offered extravagant sums to bring their research work to private industry and any number of universities. It was not long until their work was subjected to the rigorous tests of the scientific method and found to be a failure. No other lab could replicate their findings. Consequently they have sunk into obscurity and their theory discarded. It may surface again when someone can pass the tests of the hypotheses required by the scientific method, but until then it is just a curiosity. Many pure frauds have been attempted over time, but most have been found out by applying the process of the scientific method. This discussion is meant to show just where in this process statistics falls. Statistics and statisticians are not necessarily in the business of developing theories, but in the business of testing others' theories. Hypotheses come from these theories based upon an explicit set of assumptions and sound logic. The hypothesis comes first, before any data are gathered. Data do not create hypotheses; they are used to test them. If we bear this in mind as we study this section the process of forming and testing hypotheses will make more sense. One job of a statistician is to make statistical inferences about populations based on samples taken from the population. Confidence intervals are one way to estimate a population parameter. Another way to make a statistical inference is to make a decision about the value of a specific parameter. For instance, a car dealer advertises that its new small truck gets 35 miles per gallon, on average. A tutoring service claims that its method of tutoring helps 90% of its students get an A or a B. A company says that women managers in their company earn an average of $60,000 per year. A statistician will make a decision about these claims. This process is called " hypothesis testing ." A hypothesis test involves collecting data from a sample and evaluating the data. Then, the statistician makes a decision as to whether or not there is sufficient evidence, based upon analyses of the data, to reject the null hypothesis. In this chapter, you will conduct hypothesis tests on single means and single proportions. You will also learn about the errors associated with these tests. Confidence Interval (CI) an interval estimate for an unknown population parameter. This depends on: The desired confidence level. Information that is known about the distribution (for example, known standard deviation). The sample and its size. Hypothesis Testing Based on sample evidence, a procedure for determining whether the hypothesis stated is a reasonable statement and should not be rejected, or is unreasonable and should be rejected.

Math


Null and Alternative Hypotheses The actual test begins by considering two hypotheses . They are called the null hypothesis and the alternative hypothesis . These hypotheses contain opposing viewpoints. H 0 : The null hypothesis: It is a statement of no difference between the variables–they are not related. This can often be considered the status quo and as a result if you cannot accept the null it requires some action. H a : The alternative hypothesis: It is a claim about the population that is contradictory to H 0 and what we conclude when we cannot accept H 0 . This is usually what the researcher is trying to prove. The alternative hypothesis is the contender and must win with significant evidence to overthrow the status quo. This concept is sometimes referred to the tyranny of the status quo because as we will see later, to overthrow the null hypothesis takes usually 90 or greater confidence that this is the proper decision. Since the null and alternative hypotheses are contradictory, you must examine evidence to decide if you have enough evidence to reject the null hypothesis or not. The evidence is in the form of sample data. After you have determined which hypothesis the sample supports, you make a decision. There are two options for a decision. They are "cannot accept H 0 " if the sample information favors the alternative hypothesis or "do not reject H 0 " or "decline to reject H 0 " if the sample information is insufficient to reject the null hypothesis. These conclusions are all based upon a level of probability, a significance level, that is set by the analyst. Table 9.1 presents the various hypotheses in the relevant pairs. For example, if the null hypothesis is equal to some value, the alternative has to be not equal to that value. H 0 H a equal (=) not equal (≠) greater than or equal to (≥) less than (<) less than or equal to (≤) more than (>) NOTE As a mathematical convention H 0 always has a symbol with an equal in it. H a never has a symbol with an equal in it. The choice of symbol depends on the wording of the hypothesis test. H 0 : No more than 30% of the registered voters in Santa Clara County voted in the primary election. p ≤ .30 H a : More than 30% of the registered voters in Santa Clara County voted in the primary election. p > 30 Try It A medical trial is conducted to test whether or not a new medicine reduces cholesterol by 25%. State the null and alternative hypotheses. We want to test whether the mean GPA of students in American colleges is different from 2.0 (out of 4.0). The null and alternative hypotheses are: H 0 : μ = 2.0 H a : μ ≠ 2.0 Try It We want to test whether the mean height of eighth graders is 66 inches. State the null and alternative hypotheses. Fill in the correct symbol (=, ≠, ≥, <, ≤, >) for the null and alternative hypotheses. H 0 : μ __ 66 H a : μ __ 66 We want to test if college students take less than five years to graduate from college, on the average. The null and alternative hypotheses are: H 0 : μ ≥ 5 H a : μ < 5 Try It We want to test if it takes fewer than 45 minutes to teach a lesson plan. State the null and alternative hypotheses. Fill in the correct symbol ( =, ≠, ≥, <, ≤, >) for the null and alternative hypotheses. H 0 : μ __ 45 H a : μ __ 45 Chapter Review In a hypothesis test , sample data is evaluated in order to arrive at a decision about some type of claim. If certain conditions about the sample are satisfied, then the claim can be evaluated for a population. In a hypothesis test, we: Evaluate the null hypothesis , typically denoted with H 0 . The null is not rejected unless the hypothesis test shows otherwise. The null statement must always contain some form of equality (=, ≤ or ≥) Always write the alternative hypothesis , typically denoted with H a or H 1 , using not equal, less than or greater than symbols, i.e., (≠, <, or > ). If we reject the null hypothesis, then we can assume there is enough evidence to support the alternative hypothesis. Never state that a claim is proven true or false. Keep in mind the underlying fact that hypothesis testing is based on probability laws; therefore, we can talk only in terms of non-absolute certainties. You are testing that the mean speed of your cable Internet connection is more than three Megabits per second. What is the random variable? Describe in words. The random variable is the mean Internet speed in Megabits per second. You are testing that the mean speed of your cable Internet connection is more than three Megabits per second. State the null and alternative hypotheses. The American family has an average of two children. What is the random variable? Describe in words. The random variable is the mean number of children an American family has. The mean entry level salary of an employee at a company is $58,000. You believe it is higher for IT professionals in the company. State the null and alternative hypotheses. A sociologist claims the probability that a person picked at random in Times Square in New York City is visiting the area is 0.83. You want to test to see if the proportion is actually less. What is the random variable? Describe in words. The random variable is the proportion of people picked at random in Times Square visiting the city. A sociologist claims the probability that a person picked at random in Times Square in New York City is visiting the area is 0.83. You want to test to see if the claim is correct. State the null and alternative hypotheses. In a population of fish, approximately 42% are female. A test is conducted to see if, in fact, the proportion is less. State the null and alternative hypotheses. H 0 : p = 0.42 H a : p < 0.42 Suppose that a previous study stated that the mean time spent in jail by a first–time convicted burglar is 2.5 years. A revised study was then done to see if the mean time has increased. A random sample of 26 first-time convicted burglars in a recent year was picked. The mean length of time in jail from the survey was 3 years with a standard deviation of 1.8 years. Suppose that it is somehow known that the population standard deviation is 1.5. If you were conducting a hypothesis test to determine if the mean length of jail time has increased, what would the null and alternative hypotheses be? The distribution of the population is normal. H 0 : ________ H a : ________ A random survey of 75 people with student loans revealed that the mean length of time in repayment is 17.4 years with a standard deviation of 6.3 years. If you were conducting a hypothesis test to determine if the population mean time in repayment could likely be 15 years, what would the null and alternative hypotheses be? H 0 : __________ H a : __________ H 0 : μ = 15 H a : μ ≠ 15 The National Institute of Mental Health published an article stating that in any one-year period, approximately 9.5% of American adults suffer from depression or a depressive illness. Suppose that in a survey of 100 people in a certain town, seven of them suffered from depression or a depressive illness. If you were conducting a hypothesis test to determine if the true proportion of people in that town suffering from depression or a depressive illness is lower than the percent in the general adult American population, what would the null and alternative hypotheses be? H 0 : ________ H a : ________ Homework Some of the following statements refer to the null hypothesis, some to the alternate hypothesis. State the null hypothesis, H 0 , and the alternative hypothesis. H a , in terms of the appropriate parameter ( μ or p ). The mean number of years Americans work before retiring is 34. At most 60% of Americans vote in presidential elections. The mean starting salary for San Jose State University graduates is at least $100,000 per year. Twenty-nine percent of high school seniors get drunk each month. Fewer than 5% of adults ride the bus to work in Los Angeles. The mean number of cars a person owns in her lifetime is not more than ten. About half of Americans prefer to live away from cities, given the choice. Europeans have a mean paid vacation each year of six weeks. The chance of developing breast cancer is under 11% for females. Private universities' mean tuition cost is more than $20,000 per year. H 0 : μ = 34; H a : μ ≠ 34 H 0 : p ≤ 0.60; H a : p > 0.60 H 0 : μ ≥ 100,000; H a : μ < 100,000 H 0 : p = 0.29; H a : p ≠ 0.29 H 0 : p = 0.05; H a : p < 0.05 H 0 : μ ≤ 10; H a : μ > 10 H 0 : p = 0.50; H a : p ≠ 0.50 H 0 : μ = 6; H a : μ ≠ 6 H 0 : p ≥ 0.11; H a : p < 0.11 H 0 : μ ≤ 20,000; H a : μ > 20,000 Over the past few decades, public health officials have examined the link between weight concerns and teen girls' smoking. Researchers surveyed a group of 273 randomly selected teen girls living in Massachusetts (between 12 and 15 years old). After four years the girls were surveyed again. Sixty-three said they smoked to stay thin. Is there good evidence that more than 30% of the teen girls smoke to stay thin? The alternative hypothesis is: p < 0.30 p ≤ 0.30 p ≥ 0.30 p > 0.30 A statistics instructor believes that fewer than 20% of Evergreen Valley College (EVC) students attended the opening night midnight showing of the latest Marvel Universe movie. The instructor surveys 84 students and finds that 11 attended the midnight showing. An appropriate alternative hypothesis is: p = 0.20 p > 0.20 p < 0.20 p ≤ 0.20 c Previously, an organization reported that teenagers spent 4.5 hours per week, on average, on the phone. The organization thinks that, currently, the mean is higher. Fifteen randomly chosen teenagers were asked how many hours per week they spend on the phone. The sample mean was 4.75 hours with a sample standard deviation of 2.0. Conduct a hypothesis test. The null and alternative hypotheses are: H o : x ¯ = 4.5, H a : x ¯ > 4.5 H o : μ ≥ 4.5, H a : μ < 4.5 H o : μ = 4.75, H a : μ > 4.75 H o : μ = 4.5, H a : μ > 4.5 References Data from the National Institute of Mental Health. Available online at http://www.nimh.nih.gov/publicat/depression.cfm. Hypothesis a statement about the value of a population parameter, in case of two hypotheses, the statement assumed to be true is called the null hypothesis (notation H 0 ) and the contradictory statement is called the alternative hypothesis (notation H a ).

Math


Outcomes and the Type I and Type II Errors When you perform a hypothesis test, there are four possible outcomes depending on the actual truth (or falseness) of the null hypothesis H 0 and the decision to reject or not. The outcomes are summarized in the following table: Statistical Decision H 0 is actually... True False Cannot reject H 0 Correct outcome Type II error Cannot accept H 0 Type I error Correct outcome The four possible outcomes in the table are: The decision is cannot reject H 0 when H 0 is true (correct decision). The decision is cannot accept H 0 when H 0 is true (incorrect decision known as a Type I error ). This case is described as "rejecting a good null". As we will see later, it is this type of error that we will guard against by setting the probability of making such an error. The goal is to NOT take an action that is an error. The decision is cannot reject H 0 when, in fact, H 0 is false (incorrect decision known as a Type II error ). This is called "accepting a false null". In this situation you have allowed the status quo to remain in force when it should be overturned. As we will see, the null hypothesis has the advantage in competition with the alternative. The decision is cannot accept H 0 when H 0 is false ( correct decision ). Each of the errors occurs with a particular probability. The Greek letters α and β represent the probabilities. α = probability of a Type I error = P (Type I error) = probability of rejecting the null hypothesis when the null hypothesis is true: rejecting a good null. β = probability of a Type II error = P (Type II error) = probability of not rejecting the null hypothesis when the null hypothesis is false. (1 − β ) is called the Power of the Test . α and β should be as small as possible because they are probabilities of errors. Statistics allows us to set the probability that we are making a Type I error. The probability of making a Type I error is α. Recall that the confidence intervals in the last unit were set by choosing a value called Z α (or t α ) and the alpha value determined the confidence level of the estimate because it was the probability of the interval failing to capture the true mean (or proportion parameter p). This alpha and that one are the same. The easiest way to see the relationship between the alpha error and the level of confidence is with the following figure. In the center of is a normally distributed sampling distribution marked H 0 . This is a sampling distribution of X ¯ and by the Central Limit Theorem it is normally distributed. The distribution in the center is marked H 0 and represents the distribution for the null hypotheses H 0 : µ = 100. This is the value that is being tested. The formal statements of the null and alternative hypotheses are listed below the figure. The distributions on either side of the H 0 distribution represent distributions that would be true if H 0 is false, under the alternative hypothesis listed as H a . We do not know which is true, and will never know. There are, in fact, an infinite number of distributions from which the data could have been drawn if H a is true, but only two of them are on representing all of the others. To test a hypothesis we take a sample from the population and determine if it could have come from the hypothesized distribution with an acceptable level of significance. This level of significance is the alpha error and is marked on as the shaded areas in each tail of the H 0 distribution. (Each area is actually α/2 because the distribution is symmetrical and the alternative hypothesis allows for the possibility for the value to be either greater than or less than the hypothesized value--called a two-tailed test). If the sample mean marked as X ¯ 1 is in the tail of the distribution of H 0 , we conclude that the probability that it could have come from the H 0 distribution is less than alpha. We consequently state, "the null hypothesis cannot be accepted with (α) level of significance". The truth may be that this X ¯ 1 did come from the H 0 distribution, but from out in the tail. If this is so then we have falsely rejected a true null hypothesis and have made a Type I error. What statistics has done is provide an estimate about what we know, and what we control, and that is the probability of us being wrong, α. We can also see in that the sample mean could be really from an H a distribution, but within the boundary set by the alpha level. Such a case is marked as X ¯ 2 . There is a probability that X ¯ 2 actually came from H a but shows up in the range of H 0 between the two tails. This probability is the beta error, the probability of accepting a false null. Our problem is that we can only set the alpha error because there are an infinite number of alternative distributions from which the mean could have come that are not equal to H 0 . As a result, the statistician places the burden of proof on the alternative hypothesis. That is, we will not reject a null hypothesis unless there is a greater than 90, or 95, or even 99 percent probability that the null is false: the burden of proof lies with the alternative hypothesis. This is why we called this the tyranny of the status quo earlier. By way of example, the American judicial system begins with the concept that a defendant is "presumed innocent". This is the status quo and is the null hypothesis. The judge will tell the jury that they cannot find the defendant guilty unless the evidence indicates guilt beyond a "reasonable doubt" which is usually defined in criminal cases as 95% certainty of guilt. If the jury cannot accept the null, innocent, then action will be taken, jail time. The burden of proof always lies with the alternative hypothesis. (In civil cases, the jury needs only to be more than 50% certain of wrongdoing to find culpability, called "a preponderance of the evidence"). The example above was for a test of a mean, but the same logic applies to tests of hypotheses for all statistical parameters one may wish to test. The following are examples of Type I and Type II errors. Suppose the null hypothesis, H 0 , is: Navah's rock climbing equipment is safe. Type I error : Navah thinks that his rock climbing equipment may not be safe when, in fact, it really is safe. Type II error : Navah thinks that her rock climbing equipment may be safe when, in fact, it is not safe. α = probability that Navah thinks her rock climbing equipment may not be safe when, in fact, it really is safe. β = probability that Navah thinks her rock climbing equipment may be safe when, in fact, it is not safe. Notice that, in this case, the error with the greater consequence is the Type II error. (If Navah thinks her rock climbing equipment is safe, she will go ahead and use it.) This is a situation described as "accepting a false null". Try It Suppose the null hypothesis, H 0 , is: the blood cultures contain no traces of pathogen X . State the Type I and Type II errors. Suppose the null hypothesis, H 0 , is: The victim of an automobile accident is alive when he arrives at the emergency room of a hospital. This is the status quo and requires no action if it is true. If the null hypothesis cannot be accepted then action is required and the hospital will begin appropriate procedures. Type I error : The emergency crew thinks that the victim is dead when, in fact, the victim is alive. Type II error : The emergency crew does not know if the victim is alive when, in fact, the victim is dead. α = probability that the emergency crew thinks the victim is dead when, in fact, he is really alive = P (Type I error). β = probability that the emergency crew does not know if the victim is alive when, in fact, the victim is dead = P (Type II error). The error with the greater consequence is the Type I error. (If the emergency crew thinks the victim is dead, they will not treat him.) Try It Suppose the null hypothesis, H 0 , is: a patient is not sick. Which type of error has the greater consequence, Type I or Type II? The error with the greater consequence is the Type II error: the patient will be thought well when, in fact, he is sick, so he will not get treatment. A company called Genetic Labs claims to be able to increase the likelihood that a pregnancy will result in a male being born. Statisticians want to test the claim. Suppose that the null hypothesis, H 0 , is: Genetic Labs has no effect on sex outcome. The status quo is that the claim is false. The burden of proof always falls to the person making the claim, in this case the Genetics Lab. Type I error : This results when a true null hypothesis is rejected. In the context of this scenario, we would state that we believe that Genetic Labs influences the sex outcome, when in fact it has no effect. The probability of this error occurring is denoted by the Greek letter alpha, α . Type II error : This results when we fail to reject a false null hypothesis. In context, we would state that Genetic Labs does not influence the sex outcome of a pregnancy when, in fact, it does. The probability of this error occurring is denoted by the Greek letter beta, β . The error of greater consequence would be the Type I error since people would use the Genetic Labs product in hopes of increasing the chances of having a male. Try It “Red tide” is a bloom of poison-producing algae–a few different species of a class of plankton called dinoflagellates. When the weather and water conditions cause these blooms, shellfish such as clams living in the area develop dangerous levels of a paralysis-inducing toxin. In Massachusetts, the Division of Marine Fisheries (DMF) monitors levels of the toxin in shellfish by regular sampling of shellfish along the coastline. If the mean level of toxin in clams exceeds 800 μg (micrograms) of toxin per kg of clam meat in any area, clam harvesting is banned there until the bloom is over and levels of toxin in clams subside. Describe both a Type I and a Type II error in this context, and state which error has the greater consequence. In this scenario, an appropriate null hypothesis would be H 0 : the mean level of toxins is at most 800 μ g, H 0 : μ 0 ≤ 800 μ g. Type I error : The DMF believes that toxin levels are still too high when, in fact, toxin levels are at most 800 μ g. The DMF continues the harvesting ban. Type II error : The DMF believes that toxin levels are within acceptable levels (are at least 800 μ g) when, in fact, toxin levels are still too high (more than 800 μ g). The DMF lifts the harvesting ban. This error could be the most serious. If the ban is lifted and clams are still toxic, consumers could possibly eat tainted food. In summary, the more dangerous error would be to commit a Type II error, because this error involves the availability of tainted clams for consumption. A certain experimental drug claims a cure rate of at least 75% for males with prostate cancer. Describe both the Type I and Type II errors in context. Which error is the more serious? Type I : A cancer patient believes the cure rate for the drug is less than 75% when it actually is at least 75%. Type II : A cancer patient believes the experimental drug has at least a 75% cure rate when it has a cure rate that is less than 75%. In this scenario, the Type II error contains the more severe consequence. If a patient believes the drug works at least 75% of the time, this most likely will influence the patient’s (and doctor’s) choice about whether to use the drug as a treatment option. Try It Determine both Type I and Type II errors for the following scenario: Assume a null hypothesis, H 0 , that states the percentage of adults with jobs is at least 88%. Identify the Type I and Type II errors from these four statements. Not to reject the null hypothesis that the percentage of adults who have jobs is at least 88% when that percentage is actually less than 88% Not to reject the null hypothesis that the percentage of adults who have jobs is at least 88% when the percentage is actually at least 88%. Reject the null hypothesis that the percentage of adults who have jobs is at least 88% when the percentage is actually at least 88%. Reject the null hypothesis that the percentage of adults who have jobs is at least 88% when that percentage is actually less than 88%. Chapter Review In every hypothesis test, the outcomes are dependent on a correct interpretation of the data. Incorrect calculations or misunderstood summary statistics can yield errors that affect the results. A Type I error occurs when a true null hypothesis is rejected. A Type II error occurs when a false null hypothesis is not rejected. The probabilities of these errors are denoted by the Greek letters α and β , for a Type I and a Type II error respectively. The power of the test, 1 – β , quantifies the likelihood that a test will yield the correct result of a true alternative hypothesis being accepted. A high power is desirable. The mean price of mid-sized cars in a region is $32,000. A test is conducted to see if the claim is true. State the Type I and Type II errors in complete sentences. Type I: The mean price of mid-sized cars is $32,000, but we conclude that it is not $32,000. Type II: The mean price of mid-sized cars is not $32,000, but we conclude that it is $32,000. A sleeping bag is tested to withstand temperatures of –15 °F. You think the bag cannot stand temperatures that low. State the Type I and Type II errors in complete sentences. For Exercise 9.12 , what are α and β in words? α = the probability that you think the bag cannot withstand -15 degrees F, when in fact it can β = the probability that you think the bag can withstand -15 degrees F, when in fact it cannot In words, describe 1 – β For Exercise 9.12 . A group of doctors is deciding whether or not to perform an operation. Suppose the null hypothesis, H 0 , is: the surgical procedure will go well. State the Type I and Type II errors in complete sentences. Type I: The procedure will go well, but the doctors think it will not. Type II: The procedure will not go well, but the doctors think it will. A group of doctors is deciding whether or not to perform an operation. Suppose the null hypothesis, H 0 , is: the surgical procedure will go well. Which is the error with the greater consequence? The power of a test is 0.981. What is the probability of a Type II error? 0.019 A group of divers is exploring an old sunken ship. Suppose the null hypothesis, H 0 , is: the sunken ship does not contain buried treasure. State the Type I and Type II errors in complete sentences. A microbiologist is testing a water sample for E-coli. Suppose the null hypothesis, H 0 , is: the sample does not contain E-coli. The probability that the sample does not contain E-coli, but the microbiologist thinks it does is 0.012. The probability that the sample does contain E-coli, but the microbiologist thinks it does not is 0.002. What is the power of this test? 0.998 A microbiologist is testing a water sample for E-coli. Suppose the null hypothesis, H 0 , is: the sample contains E-coli. Which is the error with the greater consequence? Homework State the Type I and Type II errors in complete sentences given the following statements. The mean number of years Americans work before retiring is 34. At most 60% of Americans vote in presidential elections. The mean starting salary for San Jose State University graduates is at least $100,000 per year. Twenty-nine percent of high school seniors get drunk each month. Fewer than 5% of adults ride the bus to work in Los Angeles. The mean number of cars a person owns in their lifetime is not more than ten. About half of Americans prefer to live away from cities, given the choice. Europeans have a mean paid vacation each year of six weeks. The chance of developing breast cancer is under 11% for females. Private universities mean tuition cost is more than $20,000 per year. Type I error: We conclude that the mean is not 34 years, when it really is 34 years. Type II error: We conclude that the mean is 34 years, when in fact it really is not 34 years. Type I error: We conclude that more than 60% of Americans vote in presidential elections, when the actual percentage is at most 60%.Type II error: We conclude that at most 60% of Americans vote in presidential elections when, in fact, more than 60% do. Type I error: We conclude that the mean starting salary is less than $100,000, when it really is at least $100,000. Type II error: We conclude that the mean starting salary is at least $100,000 when, in fact, it is less than $100,000. Type I error: We conclude that the proportion of high school seniors who get drunk each month is not 29%, when it really is 29%. Type II error: We conclude that the proportion of high school seniors who get drunk each month is 29% when, in fact, it is not 29%. Type I error: We conclude that fewer than 5% of adults ride the bus to work in Los Angeles, when the percentage that do is really 5% or more. Type II error: We conclude that 5% or more adults ride the bus to work in Los Angeles when, in fact, fewer that 5% do. Type I error: We conclude that the mean number of cars a person owns in their lifetime is more than 10, when in reality it is not more than 10. Type II error: We conclude that the mean number of cars a person owns in their lifetime is not more than 10 when, in fact, it is more than 10. Type I error: We conclude that the proportion of Americans who prefer to live away from cities is not about half, though the actual proportion is about half. Type II error: We conclude that the proportion of Americans who prefer to live away from cities is half when, in fact, it is not half. Type I error: We conclude that the duration of paid vacations each year for Europeans is not six weeks, when in fact it is six weeks. Type II error: We conclude that the duration of paid vacations each year for Europeans is six weeks when, in fact, it is not. Type I error: We conclude that the proportion is less than 11%, when it is really at least 11%. Type II error: We conclude that the proportion of females who develop breast cancer is at least 11%, when in fact it is less than 11%. Type I error: We conclude that the average tuition cost at private universities is more than $20,000, though in reality it is at most $20,000. Type II error: We conclude that the average tuition cost at private universities is at most $20,000 when, in fact, it is more than $20,000. For statements a-j in Exercise 9.49 , answer the following in complete sentences. State a consequence of committing a Type I error. State a consequence of committing a Type II error. When a new drug is created, the pharmaceutical company must subject it to testing before receiving the necessary permission from the Food and Drug Administration (FDA) to market the drug. Suppose the null hypothesis is “the drug is unsafe.” What is the Type II Error? To conclude the drug is safe when in, fact, it is unsafe. Not to conclude the drug is safe when, in fact, it is safe. To conclude the drug is safe when, in fact, it is safe. Not to conclude the drug is unsafe when, in fact, it is unsafe. b A statistics instructor believes that fewer than 20% of Evergreen Valley College (EVC) students attended the opening midnight showing of the latest Marvel Universe movie. The instructor surveys 84 of students in the class and finds that 11 of them attended the midnight showing. The Type I error is to conclude that the percent of EVC students who attended is ________. at least 20%, when in fact, it is less than 20%. 20%, when in fact, it is 20%. less than 20%, when in fact, it is at least 20%. less than 20%, when in fact, it is less than 20%. It is believed that Lake Tahoe Community College (LTCC) Intermediate Algebra students get less than seven hours of sleep per night, on average. A survey of 22 LTCC Intermediate Algebra students generated a mean of 7.24 hours with a standard deviation of 1.93 hours. At a level of significance of 5%, do LTCC Intermediate Algebra students get less than seven hours of sleep per night, on average? The Type II error is not to reject that the mean number of hours of sleep LTCC students get per night is at least seven when, in fact, the mean number of hours is more than seven hours. is at most seven hours. is at least seven hours. is less than seven hours. d Previously, an organization reported that teenagers spent 4.5 hours per week, on average, on the phone. The organization thinks that, currently, the mean is higher. Fifteen randomly chosen teenagers were asked how many hours per week they spend on the phone. The sample mean was 4.75 hours with a sample standard deviation of 2.0. Conduct a hypothesis test, the Type I error is: to conclude that the current mean hours per week is higher than 4.5, when in fact, it is higher to conclude that the current mean hours per week is higher than 4.5, when in fact, it is the same to conclude that the mean hours per week currently is 4.5, when in fact, it is higher to conclude that the mean hours per week currently is no higher than 4.5, when in fact, it is not higher Type I Error The decision is to reject the null hypothesis when, in fact, the null hypothesis is true. Type II Error The decision is not to reject the null hypothesis when, in fact, the null hypothesis is false.

Math


Probability Distribution Needed for Hypothesis Testing Earlier in the course, we discussed sampling distributions. Particular distributions are associated with various types of hypothesis testing. The following table summarizes various hypothesis tests and corresponding probability distributions that will be used to conduct the test (based on the assumptions shown below): Type of Hypothesis Test Population Parameter Estimated value (point estimate) Probability Distribution Used Hypothesis test for the mean, when the population standard deviation is known Population mean μ Sample mean x ¯ Normal distribution, X ¯ ~ N ( μ X , σ X n ) Hypothesis test for the mean, when the population standard deviation is unknown and the distribution of the sample mean is approximately normal Population mean μ Sample mean x ¯ Student’s t-distribution, t d f Hypothesis test for proportions Population proportion p Sample proportion p ' Normal distribution, P ' ~ N ( p , p · q n ) Assumptions When you perform a hypothesis test of a single population mean μ using a normal distribution (often called a z-test), you take a simple random sample from the population. The population you are testing is normally distributed , or your sample size is sufficiently large. You know the value of the population standard deviation , which, in reality, is rarely known. When you perform a hypothesis test of a single population mean μ using a Student's t-distribution (often called a t -test), there are fundamental assumptions that need to be met in order for the test to work properly. Your data should be a simple random sample that comes from a population that is approximately normally distributed. You use the sample standard deviation to approximate the population standard deviation. (Note that if the sample size is sufficiently large, a t -test will work even if the population is not approximately normally distributed). When you perform a hypothesis test of a single population proportion p , you take a simple random sample from the population. You must meet the conditions for a binomial distribution : there are a certain number n of independent trials, the outcomes of any trial are success or failure, and each trial has the same probability of a success p . The shape of the binomial distribution needs to be similar to the shape of the normal distribution. To ensure this, the quantities np and nq must both be greater than five ( n p > 5 and n q > 5 ). Then the binomial distribution of a sample (estimated) proportion can be approximated by the normal distribution with μ = p and σ = p q n . Remember that q = 1 - p . Hypothesis Test for the Mean Going back to the standardizing formula we can derive the test statistic for testing hypotheses concerning means. Z c = x ¯ - μ 0 σ / n The standardizing formula cannot be solved as it is because we do not have μ, the population mean. However, if we substitute in the hypothesized value of the mean, μ 0 in the formula as above, we can compute a Z value. This is the test statistic for a test of hypothesis for a mean and is presented in . We interpret this Z value as the associated probability that a sample with a sample mean of X ¯ could have come from a distribution with a population mean of H 0 and we call this Z value Z c for “calculated”. and show this process. In two of the three possible outcomes are presented. X ¯ 1 and X ¯ 3 are in the tails of the hypothesized distribution of H 0 . Notice that the horizontal axis in the top panel is labeled X ¯ 's. This is the same theoretical distribution of X ¯ 's, the sampling distribution, that the Central Limit Theorem tells us is normally distributed. This is why we can draw it with this shape. The horizontal axis of the bottom panel is labeled Z and is the standard normal distribution. Z α 2 and -Z α 2 , called the critical values , are marked on the bottom panel as the Z values associated with the probability the analyst has set as the level of significance in the test, (α). The probabilities in the tails of both panels are, therefore, the same. Notice that for each X ¯ there is an associated Z c , called the calculated Z, that comes from solving the equation above. This calculated Z is nothing more than the number of standard deviations that the hypothesized mean is from the sample mean. If the sample mean falls "too many" standard deviations from the hypothesized mean we conclude that the sample mean could not have come from the distribution with the hypothesized mean, given our pre-set required level of significance. It could have come from H 0 , but it is deemed just too unlikely. In both X ¯ 1 and X ¯ 3 are in the tails of the distribution. They are deemed "too far" from the hypothesized value of the mean given the chosen level of alpha. If in fact this sample mean it did come from H 0 , but from in the tail, we have made a Type I error: we have rejected a good null. Our only real comfort is that we know the probability of making such an error, α, and we can control the size of α. shows the third possibility for the location of the sample mean, x _ . Here the sample mean is within the two critical values. That is, within the probability of (1-α) and we cannot reject the null hypothesis. This gives us the decision rule for testing a hypothesis for a two-tailed test: Decision rule: two-tail test If | Z c | < Z α 2 : then do not REJECT H 0 If | Z c | > Z α 2 : then REJECT H 0 This rule will always be the same no matter what hypothesis we are testing or what formulas we are using to make the test. The only change will be to change the Z c to the appropriate symbol for the test statistic for the parameter being tested. Stating the decision rule another way: if the sample mean is unlikely to have come from the distribution with the hypothesized mean we cannot accept the null hypothesis. Here we define "unlikely" as having a probability less than alpha of occurring. P-Value Approach An alternative decision rule can be developed by calculating the probability that a sample mean could be found that would give a test statistic larger than the test statistic found from the current sample data assuming that the null hypothesis is true. Here the notion of "likely" and "unlikely" is defined by the probability of drawing a sample with a mean from a population with the hypothesized mean that is either larger or smaller than that found in the sample data. Simply stated, the p-value approach compares the desired significance level, α, to the p-value which is the probability of drawing a sample mean further from the hypothesized value than the actual sample mean. A large p -value calculated from the data indicates that we should not reject the null hypothesis . The smaller the p -value, the more unlikely the outcome, and the stronger the evidence is against the null hypothesis. We would reject the null hypothesis if the evidence is strongly against it. The relationship between the decision rule of comparing the calculated test statistics, Z c , and the Critical Value, Z α , and using the p -value can be seen in . The calculated value of the test statistic is Z c in this example and is marked on the bottom graph of the standard normal distribution because it is a Z value. In this case the calculated value is in the tail and thus we cannot accept the null hypothesis, the associated X ¯ is just too unusually large to believe that it came from the distribution with a mean of µ 0 with a significance level of α. If we use the p -value decision rule we need one more step. We need to find in the standard normal table the probability associated with the calculated test statistic, Z c . We then compare that to the α associated with our selected level of confidence. In we see that the p -value is less than α and therefore we cannot accept the null. We know that the p -value is less than α because the area under the p-value is smaller than α/2. It is important to note that two researchers drawing randomly from the same population may find two different P-values from their samples. This occurs because the P-value is calculated as the probability in the tail beyond the sample mean assuming that the null hypothesis is correct. Because the sample means will in all likelihood be different this will create two different P-values. Nevertheless, the conclusions as to the null hypothesis should be different with only the level of probability of α. Here is a systematic way to make a decision of whether you cannot accept or cannot reject a null hypothesis if using the p -value and a preset or preconceived α (the " significance level "). A preset α is the probability of a Type I error (rejecting the null hypothesis when the null hypothesis is true). It may or may not be given to you at the beginning of the problem. In any case, the value of α is the decision of the analyst. When you make a decision to reject or not reject H 0 , do as follows: If α > p -value, cannot accept H 0 . The results of the sample data are significant. There is sufficient evidence to conclude that H 0 is an incorrect belief and that the alternative hypothesis , H a , may be correct. If α ≤ p -value, cannot reject H 0 . The results of the sample data are not significant. There is not sufficient evidence to conclude that the alternative hypothesis, H a , may be correct. In this case the status quo stands. When you "cannot reject H 0 ", it does not mean that you should believe that H 0 is true. It simply means that the sample data have failed to provide sufficient evidence to cast serious doubt about the truthfulness of H 0 . Remember that the null is the status quo and it takes high probability to overthrow the status quo. This bias in favor of the null hypothesis is what gives rise to the statement "tyranny of the status quo" when discussing hypothesis testing and the scientific method. Both decision rules will result in the same decision and it is a matter of preference which one is used. One and Two-tailed Tests The discussion of - was based on the null and alternative hypothesis presented in . This was called a two-tailed test because the alternative hypothesis allowed that the mean could have come from a population which was either larger or smaller than the hypothesized mean in the null hypothesis. This could be seen by the statement of the alternative hypothesis as μ ≠ 100, in this example. It may be that the analyst has no concern about the value being "too" high or "too" low from the hypothesized value. If this is the case, it becomes a one-tailed test and all of the alpha probability is placed in just one tail and not split into α/2 as in the above case of a two-tailed test. Any test of a claim will be a one-tailed test. For example, a car manufacturer claims that their Model 17B provides gas mileage of greater than 25 miles per gallon. The null and alternative hypothesis would be: H 0 : µ ≤ 25 H a : µ > 25 The claim would be in the alternative hypothesis. The burden of proof in hypothesis testing is carried in the alternative. This is because failing to reject the null, the status quo, must be accomplished with 90 or 95 percent confidence that it cannot be maintained. Said another way, we want to have only a 5 or 10 percent probability of making a Type I error, rejecting a good null; overthrowing the status quo. This is a one-tailed test and all of the alpha probability is placed in just one tail and not split into α/2 as in the above case of a two-tailed test. shows the two possible cases and the form of the null and alternative hypothesis that give rise to them. where μ 0 is the hypothesized value of the population mean. Test Statistics for Test of Means, Varying Sample Size, Population Standard Deviation Known or Unknown Sample size Test statistic < 30 (σ unknown) t c = X ¯ - μ 0 s / n < 30 (σ known) Z c = X ¯ - μ 0 σ / n > 30 (σ unknown) Z c = X ¯ - μ 0 s / n > 30 (σ known) Z c = X ¯ - μ 0 σ / n Effects of Sample Size on Test Statistic In developing the confidence intervals for the mean from a sample, we found that most often we would not have the population standard deviation, σ. If the sample size were less than 30, we could simply substitute the point estimate for σ, the sample standard deviation, s, and use the student's t -distribution to correct for this lack of information. When testing hypotheses we are faced with this same problem and the solution is exactly the same. Namely: If the population standard deviation is unknown, and the sample size is less than 30, substitute s, the point estimate for the population standard deviation, σ, in the formula for the test statistic and use the student's t -distribution. All the formulas and figures above are unchanged except for this substitution and changing the Z distribution to the student's t -distribution on the graph. Remember that the student's t -distribution can only be computed knowing the proper degrees of freedom for the problem. In this case, the degrees of freedom is computed as before with confidence intervals: df = (n-1). The calculated t-value is compared to the t-value associated with the pre-set level of confidence required in the test, t α , df found in the student's t tables. If we do not know σ, but the sample size is 30 or more, we simply substitute s for σ and use the normal distribution. summarizes these rules. A Systematic Approach for Testing a Hypothesis A systematic approach to hypothesis testing follows the following steps and in this order. This template will work for all hypotheses that you will ever test. Set up the null and alternative hypothesis. This is typically the hardest part of the process. Here the question being asked is reviewed. What parameter is being tested, a mean, a proportion, differences in means, etc. Is this a one-tailed test or two-tailed test? Decide the level of significance required for this particular case and determine the critical value. These can be found in the appropriate statistical table. The levels of confidence typical for businesses are 80, 90, 95, 98, and 99. However, the level of significance is a policy decision and should be based upon the risk of making a Type I error, rejecting a good null. Consider the consequences of making a Type I error. Next, on the basis of the hypotheses and sample size, select the appropriate test statistic and find the relevant critical value: Z α , t α , etc. Drawing the relevant probability distribution and marking the critical value is always big help. Be sure to match the graph with the hypothesis, especially if it is a one-tailed test. Take a sample(s) and calculate the relevant parameters: sample mean, standard deviation, or proportion. Using the formula for the test statistic from above in step 2, now calculate the test statistic for this particular case using the parameters you have just calculated. Compare the calculated test statistic and the critical value. Marking these on the graph will give a good visual picture of the situation. There are now only two situations: The test statistic is in the tail: Cannot Accept the null, the probability that this sample mean (proportion) came from the hypothesized distribution is too small to believe that it is the real home of these sample data. The test statistic is not in the tail: Cannot Reject the null, the sample data are compatible with the hypothesized population parameter. Reach a conclusion. It is best to articulate the conclusion two different ways. First a formal statistical conclusion such as “With a 5 % level of significance we cannot accept the null hypotheses that the population mean is equal to XX (units of measurement)”. The second statement of the conclusion is less formal and states the action, or lack of action, required. If the formal conclusion was that above, then the informal one might be, “The machine is broken and we need to shut it down and call for repairs”. All hypotheses tested will go through this same process. The only changes are the relevant formulas and those are determined by the hypothesis required to answer the original question. Chapter Review In order for a hypothesis test’s results to be generalized to a population, certain requirements must be satisfied. When testing for a single population mean: A Student's t -test should be used if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large, with an unknown standard deviation. The normal test will work if the data come from a simple, random sample and the population is approximately normally distributed, or the sample size is large. When testing a single population proportion use a normal test for a single population proportion if the data comes from a simple, random sample, fill the requirements for a binomial distribution, and the mean number of success and the mean number of failures satisfy the conditions: np > 5 and nq > 5 where n is the sample size, p is the probability of a success, and q is the probability of a failure. Formula Review Test Statistics for Test of Means, Varying Sample Size, Population Known or Unknown Sample size Test statistic < 30 (σ unknown) t c = X ¯ - μ 0 s / n < 30 (σ known) Z c = X ¯ - μ 0 σ / n > 30 (σ unknown) Z c = X ¯ - μ 0 s / n > 30 (σ known) Z c = X ¯ - μ 0 σ / n Which two distributions can you use for hypothesis testing for this chapter? A normal distribution or a Student’s t -distribution Which distribution do you use when you are testing a population mean and the population standard deviation is known? Assume sample size is large. Assume a normal distribution with n ≥ 30. Which distribution do you use when the standard deviation is not known and you are testing one population mean? Assume a normal distribution, with n ≥ 30. Use a Student’s t -distribution A population mean is 13. The sample mean is 12.8, and the sample standard deviation is two. The sample size is 20. What distribution should you use to perform a hypothesis test? Assume the underlying population is normal. A population has a mean is 25 and a standard deviation of five. The sample mean is 24, and the sample size is 108. What distribution should you use to perform a hypothesis test? a normal distribution for a single population mean It is thought that 42% of respondents in a taste test would prefer Brand A . In a particular test of 100 people, 39% preferred Brand A . What distribution should you use to perform a hypothesis test? You are performing a hypothesis test of a single population mean using a Student’s t -distribution. What must you assume about the distribution of the data? It must be approximately normally distributed. You are performing a hypothesis test of a single population mean using a Student’s t -distribution. The data are not from a simple random sample. Can you accurately perform the hypothesis test? You are performing a hypothesis test of a single population proportion. What must be true about the quantities of np and nq ? They must both be greater than five. You are performing a hypothesis test of a single population proportion. You find out that np is less than five. What must you do to be able to perform a valid hypothesis test? You are performing a hypothesis test of a single population proportion. The data come from which distribution? binomial distribution Homework It is believed that Lake Tahoe Community College (LTCC) Intermediate Algebra students get less than seven hours of sleep per night, on average. A survey of 22 LTCC Intermediate Algebra students generated a mean of 7.24 hours with a standard deviation of 1.93 hours. At a level of significance of 5%, do LTCC Intermediate Algebra students get less than seven hours of sleep per night, on average? The distribution to be used for this test is X – ~ ________________ N ( 7.24 , 1.93 22 ) N ( 7.24 , 1.93 ) t 22 t 21 d Binomial Distribution a discrete random variable (RV) that arises from Bernoulli trials. There are a fixed number, n , of independent trials. “Independent” means that the result of any trial (for example, trial 1) does not affect the results of the following trials, and all trials are conducted under the same conditions. Under these circumstances the binomial RV Χ is defined as the number of successes in n trials. The notation is: X ~ B(n, p) μ = np and the standard deviation is σ = n p q . The probability of exactly x successes in n trials is P ( X = x ) = ( n x ) p x q n − x . Normal Distribution a continuous random variable (RV) with pdf f ( x ) = 1 σ 2 π e − ( x − μ ) 2 2 σ 2 , where μ is the mean of the distribution, and σ is the standard deviation, notation: X ~ N ( μ , σ ). If μ = 0 and σ = 1, the RV is called the standard normal distribution . Standard Deviation a number that is equal to the square root of the variance and measures how far data values are from their mean; notation: s for sample standard deviation and σ for population standard deviation. Student's t -Distribution investigated and reported by William S. Gossett in 1908 and published under the pseudonym Student. The major characteristics of the random variable (RV) are: It is continuous and assumes any real values. The pdf is symmetrical about its mean of zero. However, it is more spread out and flatter at the apex than the normal distribution. It approaches the standard normal distribution as n gets larger. There is a "family" of t -distributions: every representative of the family is completely defined by the number of degrees of freedom which is one less than the number of data items. Test Statistic The formula that counts the number of standard deviations on the relevant distribution that estimated parameter is away from the hypothesized value. Critical Value The t or Z value set by the researcher that measures the probability of a Type I error, α.

Math