Week 8 Notes MSIT 3000 Megan Lutz Highlight = Key Term Highlight = Key Concept Example: A professor was curious about her students’ grade point averages (GPAs). She took a random sample of 15 students and found a If you want to learn more check out write a statement that declares a prototype for a function zeroit, which can be used as follows: int x=5; zeroit(&x); /* x is now equal to 0 */
Don't forget about the age old question of biology of humans goodenough
Don't forget about the age old question of shakil haider
If you want to learn more check out edinboro university weather
Don't forget about the age old question of define thermal death point
If you want to learn more check out asish satpathy
bell-shaped distribution with mean GPA of 3.01 with a standard deviation of 0.534. What is a 99% confidence interval for the mean GPA of the professor’s students? Independence Assumption – yes 10% Condition – yes -The bell shaped distribution describes not the population, but the sample (the data distribution) -Normality Assumption ◦ Data is unimodal and symmetric Or… ◦ N> 30 (Central Limit Theorem) Or… ◦ Population is normal � ± �∗ !! 3.01 ± 2.9768 !.!"# !" -you may be given the standard error and not have to calculate. Here, we are given the standard deviation and have to calculate use JMP to get t* -use “Input probability and calculate values” df = n – 1 =14 (2.5996, 3.4204) This is the range of plausible values for a true parameter. With 99% confidence, this interval contains the true mean GPA of students. Sample size determination • If we know our desired margin of error • If we know our desired confidence level • If we have some ideas as to the population standard deviation � • We can determine before hand how big a sample to take! n = [(� ∗ �)/��]! We always round up!Week 8 Notes Example: An economist is interested in studying the incomes of consumers in a particular region. An estimate of the standard deviation is $1000. How many consumers does the economist need to sample if a 95% confidence level with margin of error $100 is needed? n = [(� ∗ �)/��]! [(1.96 ∗ 1000)/100]! -Go to the formula sheet for z* = 384.16 = 385 • The null is a statement of equality • We still collect a sample and calculate a test statistic • We still find a p-value based on the assumption that the null hypothesis is true • Small p-values are evidence against the null hypothesis Testing a mean (�) [H] ◦ H0: � = �0 (�0 is the hypothesized value or claimed value; it is a number) ◦ HA: � ≠ �0 (two-tailed) ◦ OR HA: � < �0 (left-tailed) ◦ OR HA: � > �0 (right-tailed) [MA] • Quantitative observations (to know we are estimating �) • Independence assumption o 10% condition o Randomization condition • Normality Assumption o Normal population o Or unimodal and symmetric data o Or large sample (n>30) [MA] 1. Calculate the test statistic (like a standardized value) (� − �0) / !! Week 8 Notes 2. Calculate the p-value (depends on Ha) • P – value = 2P(T n-1 > |tobserved| if HA is two tailed (≠) • P – value = P(Tn-1 < tobserved) if HA is left-taied (<) • P – value = P(Tn-1 > tobserved) if HA is right-tailed (>) • Be sure to use the correct df [C] • State your conclusion (this is not parameter or test specific) o If p-value < alpha, reject Ho o If p-value > alpha, retain Ho Example: Based on data collected over the past several years, average total daily sales at a small, rural food store are $452.80. About a year ago, the store owners implemented some changes in the way they display their goods and want to know if the average daily sales have increased. A random sample of 31 days has a mean of $472.63 and standard deviation of $85. A histogram of the data is unimodal and right skewed. Use � = 0.025 for this test. 1. [H] State the hypotheses. H0: � = 452.80 HA: � > 452.80 2. [MA] Are the conditions met to use the normal model? Independence? Yes – random sample of 31 days 10% Condition? Yes – 31 < 10% of 365 Normality? Yes – Central Limit Theorem -This is quantitative data, so there are no successes and failures 3. [M] Calculate the test statistic and p-value ( � − �0 )/ !! (472.63 – 452.80) / !"!" = 1.298 p-value? Go to JMP – Input Values and calculate probability df= 30 p-value = 0.1021 4. [C] What is your conclusion about the store’s sales? We would see a change, 10% of the time. We fail to reject the null hypothesis. The p-value is greater than alpha. We do not have enough evidence to indicate that the alternative is true.Week 8 Notes Example The technology committee at a small college has stated that the average time spent by students per lab has increased from 55 minutes, so they have recommended an increase in lab fees. The student council would like to verify the committee's claim before agreeing to the fee increase, using a significance level of 0.05. The council randomly selects 28 student lab visits and records the usage. The data are bell-shaped with a mean of 62.67 minutes and a standard deviation of 23 minutes. 1. State hypotheses. H0: � = 55 HA: � > 55 2. Are conditions met to use the normal model? Independence – Yes 10% Condition – Yes, assumed Normality – yes, date is bell-shaped 3. Test statistic and p-value ( 62.67 − 55 )/ !"!" = 1.7646 p-value = 0.0445 4. Draw conclusions. P-value is less than alpha. We reject the null. There is sufficient evidence that the alternative is true and lab fees should be increased. 5. Why would students want α=0.01? Because they do not want to pay the extra money! • Quantitative variables/means use mu • Categorical variables, rate, proportions, percentages use pWeek 8 Notes Example: After instituting some improvements, a bank wished to test whether service times at the drive through window changed. The average service time had been 110 seconds. A random sample of 35 customers resulted in a mean of 100 seconds with a standard deviation of 40 seconds. Which hypotheses should they test? a) �0: � < 110; ��: � > 110 b) �0: � = 110; ��: � < 110 c) �0: � > 100; ��: � < 100 d) ��: � = ���; ��: � ≠ ��� What is the value of the test statistic? a) � = − �. �� b) � = − 0.25 c) � = − 1.48 d) � = 2.35 -when we are dealing with means, we use t, instead of z The p-value = 0.074, but the bank manager wants to see both 90% and 95% confidence intervals. Without making these calculations, predict if 110 will be in the intervals. a) 110 will be in the 90% but not 95% interval. b) 110 will be in the 95% but not 90% interval. c) 110 will be in both intervals. d) 110 will be in neither interval. -Remember, alpha is 1 – Confidence Interval. Alpha = 0.05 if the p-value is < 0.05, we reject the null that mu = 110 If p-value is > 0.05, we would fail to reject the null that mu = 110 Our p-value is bigger than 0.05, so 110 is reasonable value in a 95% CI. 110 is plausible based on this sample at 95% confidence or alpha = 0.05. What if Alpha = 0.1? If the p-value < 0.1, we would reject the null If the p-value > 0.1 we would fail to reject the null -Our p-value is less than 0.1. At alpha= 0.1, 110 is not plausible for mu. 110 would not be inside the range of a 90% CI. -It is easier to reject the greater alpha isWeek 8 Notes Unit 8: Inference For Two Means We have handled questions about one population • Is the true proportion of the population reasonably in this CI? • Is the true proportion of the population plausibly equal to this value? • Is the true mean of the population reasonable in this CI? • Is the true mean of the population plausibly equal to this value? What if we have two populations? • Example: Which of these two web designs is easier to navigate (in terms of true mean time to ask completion)? • We can use confidence intervals and hypothesis tests to answer these questions • Describe the scenario o Quantitative response variable, y (amount of satisfaction with the reward) o Categorical predictor/explanatory variable, x (type of reward: cucumber or grape) The main question: • Is there an association between the response variable and the explanatory variable? o If an association exists, the mean response will be different the two reward types o If an association does not exist, the mean response will be the same for both reward types -> the response and explanatory variables are independent Same inferential methods as before Are the population means different? Need: • Sample statistic: �1 −�2 • Standard error: provide in output • Sampling distribution: t (because we are dealing with means) We observed sample means • We took a random sample form each population of interest • We calculated the sample mean for each sample • We found the difference between the sample means • Is that difference big enough (relative to the sampling error) [H] • H0: �1 − �2 = 0 • HA : �1 − �2 ≠ 0 (two-tailed, two-sided)Week 8 Notes • H0: �1 − �2> 0 (right-tailed, one sided) • HA : �1 − �2 < 0 (left-tailed, one-sided) [MA] • Independent groups assumption o Random assignment to treatments or random sampling from independent populations o Independence among observations within sample • Nearly normal condition (same as before, but for both groups) • Tobserved = ( �1 −�2) / (se (�1 −�2) • In JMP, analyze, Y by X, Example: Consumers increasingly make food purchases based on nutritional values. In the July 2011 issue, Consumer Reports compared the calorie content of “meat” and beef hot dogs. The researchers purchased samples of several different brands. The “meat” hot dogs averaged 111.7 calories compared to 135.4 for the beef hot dogs. Is there a difference in mean calorie content? State the null and alternative hypotheses. H0: �Beef − �Meat = 0 (the mean calorie count for beef and meat hotdogs are equal) HA : �Beef − �Meat ≠ 0 (there is a difference) -this is a two-sided hypothesis test A random sample yields a p-value of 0.024. Let α = 0.05. What is your conclusion? We reject the null hypothesis. Our p-value is less than the alpha level. We have sufficient evidence that beef hotdogs have a different calorie content than meat hotdogs.