busn 3000 notes 2

docx

School

Georgia State University *

*We aren’t endorsed by this school

Course

3000

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

13

Uploaded by pillaykrutee

Report
BUSN 3000 NOTES UNIT 5: HYPTOTHESIS TESTING Proof by Contrapositive - if scenario A is true, then we expect to see the outcome B - if we notice an absence of B, we can deduce that A is not true - a hypothesis test is a statistical version of a proof by contrapositive - in a hypothesis test we hypothesize a certain value for the parameter - t-tests are about parameters - based on what we know about sampling distributions, we can. estimate what statistic we would get if the parameter really is as hypothesized - does the statistic we actually observe align with what we would expect? - if not, maybe our hypothesis was wrong Hypothesis Testing for Proportions - used to test the parameter for a categorical variable - ex: an older gentleman says that "back in his day, names were 'good' names" (biblical); census data shows that, when he was young, 62% of people has a "biblical" name. is he right that that is less common nowdays? null hypothesis - Ho: P=0.62 (historical value for comparison) - Ho: P = .62 vs Ha: P < .62 1. establish hypthesis: - null hypothesis: represents that historical value, status quo, or baseline for comparison - ex: over 60% of engineers are male? null hypthesis would be that the proportion is 60% (bc that is your baseline for comparison) - takes the form: Ho - says that the parameter = some value; - for proportions: Ho: P = Po - always =, always P, never P hat - alternative hypothesis: represents some possibility other than Ho. this is oftentimes what we are interested in illustrating. - takes one of 3 forms: use only one for each test a. Ha: P < Po (left-tailed or one-tailed test) - left-tailed key words = decreases, less than, diminished, at most b. Ha: P > Po (right-tailed or one-tailed test) - right-tailed key words: increased, gone up, more than, at least c. Ha: P does not = Po (two-tailed test) - two-tailed test key words: different, changed, not the same, not equal to - Po must be the same in Ho 2. check conditions
- we are going to use our knowledge of sampling distributions to address whether our observed sample provides evidence against Ho - in other words if Ho were true, what would we expect to see - verify the sampling distribution: a. are the data randomly sampled and independent? (usually random selection handles both) b. is the sample size large enough - nPo >/= 10 and n(1-Po) >/= 10 (Po from Ho, n is sample size) - if both these conditions are met, then (if the null hypothesis were true) the sampling distribution from which we obtain out P hat is approximately normal, centered at P, with the SE (standard error) = square root of Po(1-Po)/n - enables us to use the normal distribution to find probabilities associated with our results - ex: we're going to take a random sample of 125 youths. will our conditions be met for a hypothesis test? 1. random sample? yep! 2. sample size sufficient? (125)(0.62)>/= 10 yep!; (125)(1-.62)>/=10 yep! If Ho were true, then that sampling distribution would be centered at .62, approximately normal, and the standard error (SE) = square root of (.62)(1-.62)/125 which equals ..... 0434 - standard error(SE): standard deviation of the sampling distribution - Suppose that of these 125 youths, 67 had approved names. How well does that mesh with the assumption that P=.62? - in other words, if P=.62, what is the probability of getting a sample distribution this low? - in normal calculator, find P(x </= 67/125) when mean = .62, SE = .0434 - yields 0.0265; about 2.65% of the time, I would get a sample like this even if P=0.62. Is this enough for us to say 0.62 is no longer accurate for P? - what we have here is a P value, this is the probability of getting sample results like what we observed if Ho happened to be true - smaller P-values provide stronger evidence against Ho since they indicate our observes results were not very likely to occur if Ho were true How to find a P value - we find a P-value using our test statistic according to Ha - if Ha: P < Po, p-value = P(x < z )
- z = test statistic - if Ha: P > Po, p-value = P (x > z) - if Ha: P not = Po, p-value = P (x < -z or x > z); two-tailed test Conclusion - the significance level (lowercase alpha) is the standard of evidence required to reject Ho - usually set before the test - if P-value < lowercase alpha, we have strong enough evidence to reject Ho, there is enough evidence to support "whatever the Ha says" - if the P-value >/= lowercase alpha, evidence is not strong enough to reject Ho, there is not enough evidence to support "whatever Ha says" - we reject or do not reject Ho, support or do not support Ha -"since the P-value is _____ is less than the signifigance level, we do ____ reject Ho, and we do _____ have enough evidence to support "whatever Ha says" - if "not" goes into any blank, it must go into all three Example 1. Suppose that we want to see if Indians are over-represented in upper management of large firms. We know from the census that 6% of Americans are Indian. We take a random sample of 1200 c-class executives; 91 are Indian. Does this provide evidence that Indians are over represented in the c-class? a) establish hypothesis: - are you indian? this is categorical question so we use proportion techniques - Ho: P = .06 vs Ha: P > .06 - P represents proportion c-class Indian b) check conditions i) random? yep! ii) nP0 and n(1-Po) >/= 10? yep! 1200(.06) = 72 1200 (.94) = 1128 iii) Is it safe to assume population is more than 10x sample size? yes, there's more than 1200 c-class executives in America c) mechanics i) the test statistic z= p hat - Po/ square root of Po (1-Po)/n 91/1200 - .06 / square root of (.06)(.94)/ 1200 = 2.310 My p hat was 2.310 standard errors more than the hypothesized value. ii) we find p-value in JMP. since Ha has >, we find p-value is P(x>/= 2.310) in a normal calculator with a mean = 0 , SD = 1 * use mean = 0, SD = 1 for p-value for proportions
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
- P - value = .0104 - If truly only 6% of c-class execs were Indian, then the probability that at least 91out of our 1200 would be Indian was .0104. "This is the probability associated with our sample results." d) conclusion (use a = .05) Since our p-value (.0104) is less than a (0.05) we are going to reject Ho. We have enough evidence to conclude that over 6% of the c-class execs are Indian. Example 2 Suppose that 80% of non-Muslim Americans consume alcohol. Is that figure lower for Muslims? Kyle & Greg decide to investigate, both using alpha = 0.05. a) What hypothesis are they testing? Ho: P = .8 vs Ha: P < .8 (left-tailed test) - P represents Muslim Americans that drink alcohol b) Suppose Kyle will sample 40 Muslims randomly. Greg will use 400 Muslims in his random sample. Who is okay to do the test? (40)(.8) = 32 (40)(1-0.8) = 8 - Kyle's sample is too small to proceed (400)(0.8) = 320 (400)(0.2) = 80 - Greg can continue because both are larger/ equal to 10. c) Find the test statistic for Greg if he found that 304 of his 400 drank alcohol. P hat = 304/ 400 = 0.76; z = -2 d) Find and interpret Greg's P-value: e) Conclusion If Muslims drank alcohol at the same rate as non- Muslims, we would get a sample proportion of .76 or less with a probability of 0.023. Since the p-value is less than the significance level we reject the null hypothesis, as a result we have enough evidence to conclude that less than 80% of Muslim Americans drink alcohol. Errors in Hypothesis Testing
- errors occur when the conclusions we make from our hypothesis tests are incongruent with the reality of the situation - in other words, what we decide regarding the rejection of Ho or the support of Ha is incorrect - steps: - formulate hypotheses - gather data - find sample statistics - test statistic - p-value - compare to alpha - make a conclusion - errors occur when our sample results are anomalous, they occur when we get sample proportions (or sample means) from the outskirts of a sampling distribution - errors are unavoidable - we do not know when we are making an error - it relies upon knowing the parameter, and if we knew the parameter, we wouldn't need to conduct a hypothesis test Types of Error - Type I Error (False Positive) " reject": occurs when we reject a true Ho - this means we support a false Ha - called false positive because usually the status quo or the "nothing special is happening" situation is reflected by Ho - Type II Error (False Negative) "not reject": occurs when we fail to reject a false Ho - we fail to support a true Ha - if you rejected Ho, the only possible error is a type I error; if you did not reject Ho, the only possible error is a type II error - you didn't necessarily make an error, but if you did, it could be one of the two types Example One Suppose you are a medical researcher proposing an experimental drug. The FDA requires that the null hypothesis is that drugs are not any more effective at treating diseases than no treatment. This means that Ha: the drug is more effective. a) Suppose you make a Type I error. What does that mean regarding your conclusion, your p-value, and the reality of the situation? A type I error involves rejecting a true Ho. This means that we concluded that the drug was more effective rejected Ho and supported Ha); in order to do this, our p-value must have been less than alpha. However, if this decision was made in error, that means that Ho is actually true (the drug is not more effective)
b) Suppose you make a Type II error instead. What does that imply about your p-value, your conclusion, and the reality of the situation? A type II error involved not rejecting a false Ho (and not supporting a true Ha). This means that our p-value must has been at least as large as alpha. As a result, we would have concluded that the drug is not more effective. Since this was an error, we actually made the wrong decision, and it turns our that the drug does work. c) The FDA believes that a type I error is substantially worse than a Type II error. As a result, the FDA really wants to avoid a Type I error. How can the FDA ensure that Type I errors are incredibly rare in medical research? Significance Level & Error - the significance level (alpha) is the probability of making a type I error - if we want to avoid a type I error, we should choose a very low alpha (unfortunately, this makes type II errors more likely to occur) - if we don't care very much whether we make a type I error, we might choose a relatively high level for alpha (which generally results in a lower probability of making a type II error - ex: since the FDA is much more concerned about making a type I error, FDA trials will oftentimes use very small alphas (alpha = 0.001: 1/1000 chance of making a type I error) - by default, in statistics alpha = 0.05, but this can change depending on context; alpha for any particular application is chosen by balancing the relative severity of a type I vs type II error Example Two Suppose you have a teacher who claims that the average on his tests is an 83. You think that he is overestimating the average. a) hypotheses Ho: P = 83; Ha: P < 83 b) Suppose you get a p-vlaue of .12; at the standard alpha = .05, what would you conclude? Since the p-value is greater than alpha, we do not reject Ho, we do not have enough evidence to conclude that 83 is an overestimate. c) Suppose you made an error. What would that involve? Since our decision was in error, we concluded that the average is not less than 83, but in reality, the average is less than 83. We failed to reject a false Ho, this is a type II error. d) Suppose our intrepid student statistician decided that a type II error is worse than making a type I error. What significance level would best reflect this student's values regarding the relative severity of errors? - alpha = .01; alpha = .05, alpha = .10 - alpha = .01 will minimize the probability of a type I error; alpha = .10 will minimize the probability of a type II error
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
UNIT 6: CONFIDENCE INTERVALS FOR PROPORTIONS - in a hypothesis test, we use a sample value to determine the viability of a particular value for the parameter - ex: Ho: P = .8 vs Ha: P < .8; we obtain p (hat): .7; we determine that .8 is a reasonable value for P - with confidence interval (CI) methodologies, we use a sample proportion to generate an interval that contains all reasonable estimates of the parameter at a specific confidence level Basics of Confidence Interval - a CI consists of two numbers: lower limit & upper limit that form an interval - we believe that with a certain amount of confidence that the parameter is somewhere between the lower and upper limits - like h-tests, CI's are used to estimate parameters, NOT statistics - the general formula for a confidence interval: sample value +/- critical value (standard error) - (critical value)(standard error) is referred to as margin of error (ME) - the sample value is just the sample statistic (e.g p hat) - the standard error we calculate with a formula - critical value determines how many standard errors we go in either direction from the sample value - this (critical value) determines/ is determined by the confidence level - confidence level tells us what % of the time this technique works CI's for Proportions - reminder: use this with categorical response variables - in this context, the CI formula becomes - p hat is sample proportion - found from data; count/total - everything under square root is the standard error; n is sample size - z* is the critical value for proportions. we find it by plugging our confidence level into the central probability of a standard normal distribution (mean = 0; SD = 1) - ex: Suppose I wanted to make a 93% confidence interval. This means that 93% is our confidence level, so we find z* by finding a central probability of .93. this yields z* = 1.812.
Example We want to estimate the true proportion (parameter) of college students that shop at Walmart at least once a week. We randomly sample 334 college students across the USA. Of these 334, 123 shop at Walmart at least once a week. Use this to create a 95% confidence interval. - categorical response; do you shop at Walmart is a yes or no question - P(hat) +/- (z*)(SE) - P (hat) = 123/334 = .3683 - z* = 1.96 - SE = (.3683)(1-.3683)/334 = .0264 - lower limit: .3683 - 1.96(.0264) margin of error - upper limit: .3683 + 1.96(.0264) = (.3166, .4200) This means we are 95% confident that the true proportion of college students who go to Walmart at least once a week is between .3166 and .4200. Conditions for CI for proportions - the CI for proportions technique that we use requires the sampling distribution to be approximately normal and centered on the parameter. this is accomplished by: 1) random sample - assures you have an unbiased sampling distribution 2) sufficient sample size such that n(phat)>/=10 & n(1-phat)>/= 10 - ex: Is our Walmart confidence interval valid? 1. random sample? yep! 2. sufficient sample size? yep! (334)(.3683) = 123 >/= 10; 334(1-.3683) >/= 10 - ex: Suppose it turned out that our sampling technique suffered from undercoverage. Is our CI still reliable? Even though it is a random sample it is biased so it invalidates the CI. Confidence Intervals for Proportions - working with pre-built intervals - sometimes, instead of being asked to construct a CI, you might be given a CI and be asked to deconstruct it; for a confidence interval of the form (lower limit, upper limit) - the sample proportion (or sample mean) will be the value at the center of the CI - remember, CI = (sample value - ME, sample value + ME); (lower limit + upper limit)/2 = ([phat - ME] + [phat + ME])/2 = 2phat/2 = phat - we find this by taking the average of the lower and upper limits - the margin of error (ME) is half of the overall length of the confidence interval (or the distance from the center to either endpoint) - ME = phat - lower limit - ME = upper limit - phat
- ME = (upper limit - lower limit)/2 example one Suppose the UHC predicts that the proportion of all UGA members that are sick this week is between .10 and .15 with 90% confidence. 1. what is the confidence interval described here? this is a 90% confidence interval: (.10, .15); (lower limit = .10, upper limit = .15) 2. what sample proportion diud the UHC find when creating this CI? the sample proportion will be at the center of the CI: (.10 + .15)/2 = .125 3. what is the margin of error for this interval? a. center - lower = .125 - .1 = .025 b. upper - center = .15 - .125 = .025 c. half the length of the interval: (.15 - .1)/2 = .025 4. suppose the UHC wanted to be more precise with their estimates. what could they do? a. more precise - narrower CI i. lower the confidence level (lower confidence - narrower CI) ii. increase the sample size (larger n - narrower CI) finding the necessary sample size - in some cases, you'll be asked to produce confidence intervals with a certain level of confidence to certain specified widths - if the confidence level is controlled, the only way we can determine the width of the CI is by manipulating the sample size (n) - to find the (minimum) sample size required to build a specified confidence interval, we use the formula: n = ¿¿ -if we have any historical or prior information about the approximate value for p, we use that for p*. if we do not, we fall back to p* = .5 (this gives us the most conservative estimate of the sample size) - since we cannot sample a fraction of a subject, we always round our answer up to the next integer regardless of normal rounding rules. we always round up because rounding up gives a ME that is slightly smaller (i.e more precise) than requested, whereas rounding down will give a ME slightly larger (i.e less precise) than requested example I want to know what proportion of college students own a cat. In 2010, a study indicated that roughly 33% of college students had a cat. I want to build a 90% confidence interval to be within 2% of the true proportion. How many people do I need to sample? - categorical: do you own a cat is a yes or no responds; so we use above formula to determine neccessary sample size - z* for 90% confidence interval is 1.645 - the margin of error is the "within" percent: since we want to be within 2%, our ME = .02 - do we have any historic or potential value for p? yes, prior study (13 years ago, but still applicable) indicated that p = .33 is a rough approximation. thus, p* = .33, which means q* = .67.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
- n = ¿¿ = 1495.755; since we cannot sample a fraction of a subject, in this case only, we would round our answer up to the next integer. n = 1496. example 2 What proportion of people have heard of [some random bread]. we want to estimate to be within 3% of the true parameter with 92% confidence. find the sample size required to build the specified interval. - we use the same formula as before (since, once again, we are finding the sample size for a categorical application): n = ¿¿ - z* fr 92% CI is 1.751 - ME = 'within 3%' = .03 - here we have no prior information regarding p or phat, so we use p* = .5 - q* = .15 (1-.5) - this yields n = 851.667, which we would round up to 852 Correspondence between Hypothesis Tests and Confidence Intervals - since both CI's and H-tests attempt to infer the value of the parameter using the sampling distribution, the results of one of these can usually imply the results of the other - a two-tailed hypothesis test corresponds to a confidence interval from the same data when the signifgance level (alpha) relates to the confidence level (c) such that: - α + c = 1; α = (100 – c%)/100%; c = (1- α )*100% - e.g suppose I build a 94% confidence interval; this means c = 94% of .94. the hypothesis test that goes with this interval is one conducted at alpha = (100 - 94)/100 = .06; .06+.94 = 1 yay! example Suppose I conduct a two-tailed hypothesis test at alpha = .03. What confidence interval corresponds to this H-test? - C = (1-.03)*100% = 97% - recall the conceptual definition of a CI: a CI gives the range of plausible/ realistic estimates for the parameter. similarly, recall what we do with a hypothesis test: we try to determine if the hypothesized value for p is realistic/ plausible, and if it is not, we reject Ho in favor of Ha. **if the hypothesized value is inside the corresponding CI, we would not reject the null hypothesis at the corresponding alpha (therefore, you an conclude that the p-value for that test would be at least alpha) - if the value is inside the CI, it's a realistic estimate for the parameter, and if it's a realtic estimate, we shouldn't reject Ho that says p = that value ** if the hypothesized value is outside the corresponding CI, we would reject the null hypothesis at the corresponding alpha (the p-value would be less than that alpha) - if the value is outside the CI, it's not a realistic estimate for the parameter, and if it's not a realistic estimate, we would want to reject the Ho: p = [that value] * if we reject Ho: p = value, we expect that value to be outside the corresponding CI * if we do not reject Ho: p = value, we expect that value to be inside the corresponding CI example 2 Suppose I want to predict the proportion of people that are allergic to pollen. I produce a 95% confidence interval: (.44, .50)
a) Find the sample proportion and margin of error used to make this CI. Sample proportion will the central value of the interval - (.5+.44)/2 = .47 - the margin of error is the difference between that proportion and either endpoint: .5 - .46 = .03 b) What could you tell me about the p-value for a hypothesis test Ho: p = .51 vs Ha: p =/= .51 conducted with this data? - notice that .51 is outside the 95% CI. as a result, we would expect to rejewct Ho (p=.51) at the corresponding significance level. 95% confidence - alpha = .05. We would expect to reject Ho at alpha = .05 - out p- value would be less than .05. c) What would you conclude regarding the hypothesis test Ho: p = .46 vs. Ha: p =/= .46 - notice that .46 is inside that CI. therefore, we would not expect to reject Ho: p =.46 EX Suppose we test H0: p = .3 vs. Ha: p=/=.3 and we get a p-value of .025. a) What would you expect regarding the 98% confidence interval built from this data? 98% confidence alpha = .02. This p-value is not less than .02, so we do not reject H0. Therefore, the value from H0 (p=.3) should be inside the corresponding 98% confidence interval. b) What would you expect from a 99% confidence interval built from this data? i) We know that a 99% confidence interval should be wider/larger than the 98% CI. Therefore, if .3 is inside the (narrower) 98% CI, it should also be inside the wider 99% CI. ii) 99% Confidence alpha = .01. The p-value is not less than alpha, so we do not reject H0, and we expect the hypothesized value (p=.3) to be inside the corresponding 99% CI. EX Suppose we want to determine the proportion of people each year that get a flu shot. We test H0: p = .4 vs. Ha: p =/= .4 and we end up rejecting H0 at alpha = .03. a) What can you say about the 97% CI? Alpha = .03 97% confidence. Since we reject H0 (p=.4) at alpha = .03, we expect that the hypothesized value (.4) should fall outside the 97% confidence interval from this data. b) What can you say about the 95% confidence interval from this data? Will that contain .4? Notice that 95% confidence corresponds to alpha = .05 (not the alpha = .03 that was used). i) If we rejected H0 at alpha = .03, that means that the p-value was less than .03. If the p-value is less than .03, it must also be less than .05. Therefore, we would also reject H0 at alpha = .05, and we should expect that the hypothesized value (.4) would be outside the 95% CI. ii) The 97% CI is wider than the 95% CI (and that they have the same center). Since the hypothesized value (.4) is not inside the larger CI, it will also not be inside the smaller 95% CI. c) Would .4 be inside or outside the 99% confidence interval?
i) We know that the p-value is less than .03 (because we rejected H0 at alpha = .03). A 99% CI corresponds to alpha = .01. If the p-value is less than .03, is it necessarily also less than .01? We don’t know. Therefore, without more information, we can’t say whether or not the 99% CI contains the hypothesized value .4. ii) We know that the 97% and 99% CI’s will have the same center, but the 99% CI will be wider. Will the 99% CI be wide enough that it covers .4 even if the 97% does not? We don’t know without any more information. To-do H-test for means in JMP 1. load dataset 2. analyze distribution on the variable of interest 3. in the red arrow next to variable name, select 'test-mean' 4. enter the hypothesized mean 5. under the t-test on right a. P > |t| is two-tailed p-value (Ha: mu =/= muo) b. P < t is left-tailed p-value (Ha: mu < muo) c. P > t is right-tailed p-value (Ha: mu > muo) example Suppose we have data on Las Vegas resort ratings. We want to see if the typical (average) rating for resorts at Vegas is at least 4. a) write the hypothesis we are testing Ho: mu = 4 vs Ha: mu > 4 b) use JMP to conduct the test analyze - distribution - review score - test mean - mean = 4 test statistic of t=2.742 and p-value of .0032 c) what conclusion would we make at alpha = .05? since the p-value is/is not less than .05, we have enough/ do not have enough evidence to support Ha/ support Ho/ reject Ha /reject Ho. since the p-value is less than .05, we have enough evidence to support Ha d) say Nick takes his own sample of 100 resorts reviews. he gets the same x bar of 4.123 and the same SD of 1.0073. will he also have the same t and p-value? No, Nick's t will decrease because smaller n means larger SE, which means his p-value will increase. This means Nick would have weaker evidence that the mean is more than 4. * test-statistic & p-value have inverse relationship * when p-value gets larger the evidence is weaker, vice versa e) suppose our original conclusion from c) was an error. what type of error was it and what does it mean? if this were an error it could only be a type I error, because we rejected the null hypothesis. we concluded that the average rating was more than 4 stars, but actually, it was not more than 4 stars. confidence intervals for means - reminder: use these techniques to infer the parameter for a quantitative variable - for CI for means, its the same procedure as with proportions when we
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
- interpret CI's (instead of population proportion it's population average) - work with pre-built CI's - correspondence with hypothesis tests building a CI for a mean - the general formula is CI = sample value +/- critical value x SE - for means, this becomes: x bar +/- t*(SD/sqrtN) - x bar is sample mean - SD/sqrtN is the standard error (n is sample size, SD is sample's standard deviation) - t* comes from a t distribution with DF= n-1 (degrees of freedom), find central probability equal to the confidence level example I take a random sample of 35 football games and find an average combined score of 54 points with a standard deviation of 10 points. Build a 95% confidence interval for the true average number of points scored. - I know I am working with means b/c points scored is quantitative & 'average' & provided with a standard deviation (these features would be absent if working with proportions) - x bar = 54, SD = 10, n = 35, t* = 2.0322 - (54 - 2.0322(10/sqrt35), 54 + 2.0322(10/sqrt35) - (50.565, 57.435) - We are 95% confident the true average combined score is within our interval; (50.565,57.435). to build a CI on JMP analyze - distribution; lower 95% mean is lower limit, upper 95% mean is upper limit (in summary statistics column)