Stor 155, Section 2, Last Time Inference for Regression –Least Square Fits –Sampling distrib’ns for slope and intercept Regression Tool –Gave many useful answers (CIs, Hypo Tests, Graphics,…) –But had to “translate language”
Reading In Textbook Approximate Reading for Today’s Material: Pages Next Time: All review
Stat 31 Final Exam: Date & Time: Tuesday, May 8, 8:00-11:00 Last Office Hours: Thursday, May 3, 12:00 - 5:00 Monday, May 7, 10:00 - 5:00 & by appointment (earlier) Bring with you, to exam: Single (8.5" x 11") sheet of formulas Front & Back OK
Prediction in Regression Idea: Given data Can find the Least Squares Fit Line, and do inference for the parameters. Given a new X value, say, what will the new Y value be?
Prediction in Regression Dealing with variation in prediction: Under the model: A sensible guess about, based on the given, is: (point on the fit line above )
Prediction in Regression What about variation about this guess? Natural Approach: present an interval (as done with Confidence Intervals) Careful: Two Notions of this: 1.Confidence Interval for mean of 2.Prediction Interval for value of
Prediction in Regression 1.Confidence Interval for mean of : Use: where: and where
Prediction in Regression Interpretation of: Smaller for closer to But never 0 Smaller for more spread out Larger for larger
Prediction in Regression 2.Prediction Interval for value of Use: where: And again
Prediction in Regression Interpretation of: Similar remarks to above … Additional “1 + ” accounts for added variation in compared to
Prediction in Regression Revisit Class Example 33, Textbook Problem : Engineers made measurements of the Leaning Tower of Pisa over the years 1975 – “Lean” is the difference between a points position if the tower were straight, and its actual position, in tenths of a meter, in excess of 2.9 meters. The data are listed above…
Prediction in Regression ??? Next time: spruce up these examples a lot ???
Prediction in Regression Class Example 33, Textbook Problems – 10.25: (a)Plot the data, Does the trend in lean over time appear to be linear? (b)What is the equation of the least squares fit line? (c)Give a 95% confidence interval for the average rate of change of the lean.
Prediction in Regression HW: 10.7 b, c, d 10.8 ((c) [11610, 12660], [9554, 14720])
Prediction in Regression Revisit Class Example 33, Textbook – 10.25: Engineers made measurements of the Leaning Tower of Pisa over the years 1975 – “Lean” is the difference between a points position if the tower were straight, and its actual position, in tenths of a meter, in excess of 2.9 meters. The data are listed above…
Prediction in Regression Class Example 33, Problem 10.24: (a)In 1918 the lean was (the coded value is 71). Using the least squares equation for the years 1975 to 1987, calculate a predicted value for the lean in 1918 (b)Although the least squares line gives an excellent fit for 1975 – 1987, this did not extend back to Why?
Prediction in Regression Class Example 33, Problem 10.25: (a)How would you code the explanatory variable for the year 2002? (b)The engineers working on the tower were most interested in how much it would lean if no corrective action were taken. Use the least squares equation line to predict the lean in
Prediction in Regression Class Example 33, Problem 10.25: (c)To give a margin of error for the lean in 2005, would you use a confidence interval for the mean, or a prediction interval? Explain your choice.
Prediction in Regression Class Example 33, Problem (d)Give the values of the 95% confidence interval for the mean, and the 95% prediction interval. How do they compare? Recall generic formula (same for both):
Prediction in Regression Class Example 33, Problem Difference was in form for SE: CI for mean: PI for value:
Outliers in Regression Caution about regression: Outliers can have a major impact Single point can throw slope way off And intercept too Can watch for this, using plot And residual plot show this, too
Nonlinear Regression When lines don’t fit data: How do we know? What can we do? There is a lot… But beyond scope of this course Some indication…
Nonlinear Regression Class Example 34: World Population Main lessons: Data can be non-linear Identify with plot Residuals even more powerful at this Look for systematic structure
Nonlinear Regression Class Example 34: World Population When data are non-linear: There is non-linear regression But not covered here Can use lin. reg’n on transformed data Log transform often useful
Next time: Additional Issues in Regression Robustness Outliers via Java Applet HW on outliers
And Now for Something Completely Different Etymology of: “And now for something completely different” Anybody heard of this before? (really 2 questions…)
And Now for Something Completely Different What is “etymology”? Google responses to: define: etymology The history of words; the study of the history of words. csmp.ucop.edu/crlp/resources/glossary.html csmp.ucop.edu/crlp/resources/glossary.html The history of a word shown by tracing its development from another language.
And Now for Something Completely Different What is “etymology”? Etymology is derived from the Greek word e/)tymon(etymon) meaning "a sense" and logo/j(logos) meaning "word." Etymology is the study of the original meaning and development of a word tracing its meaning back as far as possible.
And Now for Something Completely Different Google response to: define: and now for something completely different And Now For Something Completely Different is a film spinoff from the television comedy series Monty Python's Flying Circus. The title originated as a catchphrase in the TV show. Many Python fans feel that it excellently describes the nonsensical, non sequitur feel of the program. en.wikipedia.org/wiki/And_Now_For_Somethi ng_Completely_Different en.wikipedia.org/wiki/And_Now_For_Somethi ng_Completely_Different
And Now for Something Completely Different Google Search for: “And now for something completely different” Gives more than 100 results…. A perhaps interesting one:
And Now for Something Completely Different Google Search for: “Stor 155 and now for something completely different” Gives: [PPT] Slide 1Slide 1 File Format: Microsoft Powerpoint - View as HTML or.unc.edu/webspace/postscript/marron/Teaching/st or /... And Now for Something Completely Different. P: Dead bugs on windshield.... stat- or.unc.edu/webspace/postscript/marron/Teaching/st or /Stor ppt - Similar pagesView as HTMLSimilar pages
Review Slippery Issues Major Confusion: Population Quantities Vs. Sample Quantities
Review Slippery Issues Population Mathematical Notation: (fixed & unknown) Sample Mathematical Notation : (summaries of data, have numbers)
Hypothesis Testing – Z scores E.g. Fast Food Menus: Test Using P-value = P{what saw or m.c.| H 0 & H A bd’ry} (guides where to put $21k & $20k)
Hypothesis Testing – Z scores P-value = P{what saw or or m.c.| H 0 & H A bd’ry}
Hypothesis Testing – Z scores P-value This is the Z-score Computation: Class E.g. 24, Part 6 Distribution: N(0,1)
Hypothesis Testing – Z scores P-value So instead of reporting tail probability, Report this cutoff instead, as “SDs away from mean $20,000”
Review for Final An Important Mode of Thinking: Ideas vs. “Cookbook”
How do you view your sheet of formulas? A set of recipes? “Look through list” to solve problems? Getting harder to find now? Problems: Too many decisions to make Hard to sort out while looking through…
Ideas vs. “Cookbook” Too many decisions to make, e.g.: Binomial vs. Normal 1-sided vs. 2-sided Hypo. Tests TDIST (INV) vs. NORMDIST (INV) CI vs. Sample Size calculation 1 sample vs. 2 sample Which is H 0, H A ? And what direction? What is “m.c.”? What is “Bdry”?
Ideas vs. “Cookbook” Suggested Approach: Use concepts to guide choice This is what I try to teach And is what I am testing for… How to learn? Go through old HW (random order) When stumped, look through notes (look for main Ideas, not “the right formula”)
A useful concept Perhaps not well taught? |a – b| - “Number of spaces between a and b on the numberline” e.g. Midterm II, problem 3c (x = 0, 1, 2, 3) {|X – 1| > 1} = {“number of spaces between X and 1 is more than 1”} = {X = 3}
A useful concept e.g. Midterm II, problem 3c (x = 0, 1, 2, 3) {|X – 1| > 1} = {“number of spaces between X and 1 is more than 1”} = {X = 3} Because:
Response to a Request You said at the end of today's class that you would be willing to take class time to "reteach" concepts that might still be unknown to us. Well, in my case, it seems that probability and probability distribution is a hard concept for me to grasp. On the first midterm, I missed … and on the second midterm, I missed … I seem to be able to grasp the other concepts involving binomial distribution, normal distribution, t- distribution, etc fairly well, but probability is really killing me on the exams. If you could reteach these or brush up on them I would greatly appreciate it.
A Flash from the Past Two HW “Traps” 1.Working together: Great, if the relationship is equal But don’t be the “yes, I get it” person… 2.The HW “Consortium”: You do HW 1, and I’ll do HW 2… Easy with electronic HW Trap: HW is about learning You don’t learn on your off weeks…