Stats for EngineersLecture 9

stats for engineers lecture 9 n.w
1 / 22
Embed
Share

Explore key concepts in statistics for engineers, including confidence intervals for the mean, determining sample size for desired precision, and the principles of linear regression. Learn how to apply these techniques with practical examples and calculations to enhance your engineering analyses.

  • Stats
  • Engineers
  • Confidence Intervals
  • Sample Size
  • Regression

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Stats for Engineers Lecture 9

  2. Summary From Last Time Confidence Intervals for the mean ?2 ? to ? + ? ?2 ?, where ? If ?2 is known, confidence interval for ? is ? ? is obtained from Normal tables. If ?2is unknown (only know sample variance ?2): Assuming independent Normal data, the confidence interval for ? is: ?2 ? to ? + ?? 1 ?2 ?. ? ?? 1 Student t-distribution ?? t-tables ?(??) = ??? ?? Q ? = ? 1 ??

  3. Sample size How many random samples do you need to reach desired level of precision? Suppose we want to estimate ? to within ?, where ? (and the degree of confidence) is given. ?2 ? ? = ?? 1 Want 2 ?2 ? =?? 1 ?2 Need: - Estimate of ?2 (e.g. previous experiments) - Estimate of ?? 1. This depends on n, but not very strongly. e.g. take ?? 1= 2.1 for 95% confidence. Rule of thumb: for 95% confidence, choose ? =2.12 Estimate of variance 2

  4. Example A large number of steel plates will be used to build a ship. Ten are tested and found to have sample mean weight ? = 2.13kg and sample variance ?2=0.25 kg2 . How many need to be tested to determine the mean weight with 95% confidence to within 0.1 kg? Answer: ?2 ? Assuming plates have independent weights with a Normal distribution ? = 0.1kg = ?? 1 Take ?? 1 2.1 for 95% confidence. 2 ?2 =2.12 0.252 0.12 ? =?? 1 = 27.6 ?2 i.e. need to test about 28

  5. Number of samples ?2 ? ? = ?? 1 If you need 28 samples for the confidence interval to be 0.1 kg, approximately how many samples would you need to get a more accurate answer with confidence interval 0.01 kg? 1. 2. 3. 4. 88.5 280 2800 28000 50% 21% 18% ?2 ? 11% ? = ?? 1 ?2 ? 10= ?? 1 100? so need 100 more. i.e. 2800 1. 2 3 4

  6. Linear regression We measure a response variable ? at various values of a controlled variable ? e.g. measure fuel efficiency ? at various values of an experimentally controlled external temperature ? 250 200 y 150 100 0 10 20 30 40 x Linear regression: fitting a straight line to the mean value of ? as a function of ?

  7. ? = ?? + ? ? Distribution of ? when ? = ?1 ? ?1 ?2 ?3 Regression curve: fits the mean values of the ? distributions

  8. From a sample of ? values at various ?, we want to fit the regression curve. e.g. 250 200 y 150 100 0 10 20 30 40 x

  9. ? Straight line plots Which graph is of the line ? = 2? 4? ? 1. 2. 82% 3. 4. 12% 6% 0% 1 2 3 4

  10. From a sample of ? values at various ?, we want to fit the regression curve. e.g. 250 200 y 150 100 0 10 20 30 40 x

  11. Or is it 250 200 y 150 100 0 10 20 30 40 x What do we mean by a line being a good fit ?

  12. Equation of straight line is ? = ? + ?? Simple model for data: ??= ? + ? ??+ ?? Straight line Random error Simplest assumption: ?? ?(0,?2) for all ?, and ??'s are independent - Linear regression model

  13. Model is ??= ? + ? ??+ ?? Want to estimate parameters a and b, using the data. e.g. - choose ? and ? to minimize the errors Maximum likelihood estimate = least -squares estimate 2= 2 ? = ?? (?? ??) = ?? ? ??? Minimize ? ? ? Data point Straight-line prediction E is defined and can be minimized even when errors not Normal least-squares is simple general prescription for fitting a straight line (but statistical interpretation in general less clear)

  14. The line ? = 4 + 2? has been proposed as a line of best fit for the following four sets of data. For which data set is this line the best fit (minimum ? = ??? 2)? Question from Derek Bruff 2. 1. 59% 4. 3. 31% 6% 3% 1 2 3 4

  15. 2=??? ? ??? 2 ? How to find ? and ? that minimize ? = ??? For minimum want ?? ??= 0 and ?? ??= 0, see notes for derivation Solution is the least-squares estimates ? and ?: ? =??? and ? = ? ? ? ??? Sample means Where 2 ??? ? 2 ?? ?2 ???= ?? = ? ? ??? ??? ? ???= ???? = (?? ?) ?? ? ? ? ? = ? + ?? Equation of the fitted line is

  16. Most of the things you need to use are on the formula sheet

  17. Note that since ? = ? ? ? ? = ? + ?? = ? ? ? + ?? ? ? = ?(? ?) i.e. ( ?, ?) is on the line 250 200 y ? 150 100 ? 0 10 20 30 40 x

  18. Example: ? =??? and ? = ? ? ? ??? The data y has been observed for various values of x, as follows: 2 ??? ? 2 ???= ?? y x 240 1.6 181 9.4 193 15.5 155 20.0 172 22.0 110 35.5 113 43.0 75 40.5 94 33.0 ? ??? ??? ? Fit the simple linear regression model using least squares. ???= ???? Answer: ? Want to fit ? = ? + ?? n = 9 ???= 220.5 , ???= 1333.0 2= 220549, 2= 7053.7, ?????= 26864 ??? ??? ???= 7053.7 220.52 = 1651.42 9 ???= 26864 220.50 1333.0 = 5794.1 9 ? =??? = 5794.5 1651.45 = 3.5086 ???

  19. Answer: ? =??? and ? = ? ? ? Want to fit ? = ? + ?? ??? 2 ??? ? n = 9 ???= 220.5 , ???= 1333.0 2 ???= ?? ? 2= 220549, 2= 7053.7, ?????= 26864 ??? ??? ??? ??? ? ???= ???? ???= 7053.7 220.52 ? = 1651.42 9 ???= 26864 220.50 1333.0 = 5794.1 9 ? =??? = 5794.5 1651.45 = 3.5086 ??? Now just need ? ? = ? ? ? =1333.0 220.50 9 ( 3.5086) = 234.1 9 So the fit is approximately ? = 234.1 3.509?

  20. Which of the following data are likely to be most appropriately modelled using a linear regression model? 1. 2. 100% 3. 0% 0% 1 2 3

  21. Quantifying the goodness of the fit Estimating ??: variance of y about the fitted line Estimated error is: ??= ?? ?? 1 2 ? 1 ? ?? ??= 0, so the ordinary sample variance of the ??'s is In fact, this is biased since two parameters, a and b have been estimated. The unbiased estimate is: 1 1 2= ?2= 2 ? 2 ?? ? 2 ?? ?? =??? ???? ? 2 [derivation in notes] Residual sum of squares

  22. Which of the following plots would have the greatest residual sum of squares [variance of ? about the fitted line]? Question from Derek Bruff 1. 2. 3. 63% 25% 13% 1 2 3

Related


More Related Content