Presentation is loading. Please wait.

Presentation is loading. Please wait.

–Working with relationships between two variables “Donation “ made to teacher & Stats Test Score.

Similar presentations


Presentation on theme: "–Working with relationships between two variables “Donation “ made to teacher & Stats Test Score."— Presentation transcript:

1 –Working with relationships between two variables “Donation “ made to teacher & Stats Test Score

2 Correlation & Regression Univariate & Bivariate Statistics –U: frequency distribution, mean, mode, range, standard deviation –B: correlation – two variables Correlation –linear pattern of relationship between one variable (x) and another variable (y) – an association between two variables –relative position of one variable correlates with relative distribution of another variable X - An explanatory variable attempts to explain the observed outcomes in Y –A response variable measures an outcome of a study. Warning: –No proof of causality –Cannot assume x causes y

3 Scatterplot or Scatter Diagram a plot of paired data to determine or show a relationship between two variables

4 Graduating Seniors by State in 2005 The state of Louisiana The state of Rhode Island

5 AP Statistics, Section 3.1, Part 1 5 Figure 3.1 (Percent taking SAT vs. Score) Attributes of a good scatterplot –Consistent and uniform scale –Label on both axis –Accurate placement of data –Data throughout the axis –Axis break lines if not starting at zero. To achieve this goal you should try to do your scatterplots on graph paper.

6 Graduating Seniors by State in 2005 States from NE, Mid-Atlantic and West States from Midwest, Mtn Central, and Southwest

7 Paired Data

8 Scatter Diagram

9 Linear Correlation The general trend of the points seems to follow a straight line segment.

10 Linear Correlation

11 Non-Linear Correlation

12 No Linear Correlation

13 High Linear Correlation Points lie close to a straight line.

14 High Linear Correlation

15 Moderate Linear Correlation

16 Low Linear Correlation

17 Perfect Linear Correlation

18 Questions Arising Can we find a relationship between x and y? How strong is the relationship?

19 When there appears to be a linear relationship between x and y: attempt to “fit” a line to the scatter diagram.

20 When using x values to predict y values: Call x the explanatory variable Call y the response variable

21 Scatterplot! No Correlation –Random or circular assortment of dots Positive Correlation –ellipse leaning to right –GPA and SAT –Smoking and Lung Damage –Number of Whoppers eaten and Mr. Flynn’s weight Negative Correlation –ellipse learning to left –Depression & Self-esteem –Studying & test errors –Vampire friends & Werewolf boyfriends

22 AP Statistics, Section 3.1, Part 1 22 Interpreting Scatterplots Pattern/Shape: linear, parabola, bell shaped –Deviations from pattern: Are there areas where the data conform less to the pattern? –Form: Are there clusters of data? –Special data: Are there any influential points? –Is a transformation of data necessary? Trend/Direction: positive, negative, or WTF? –As x increases what happens to y? Strength/Association: weak, moderate, strong –IF a line were drawn through the data, how close would the points be to the line? –Is the a small or large amount of variability within the y values?

23 Pearson’s Correlation Coefficient “r” indicates… –strength of relationship (strong, weak, or none) –the variation of the points around the model (linear) –direction of relationship positive (direct) – variables move in same direction negative (inverse) – variables move in opposite directions r ranges in value from –1.0 to +1.0 Strong Negative No Rel. Strong Positive -1.0 0.0 +1.0 Try quick estimates –Next slide and strange quiz

24 Practice with Scatterplots r =.__ __

25 A relationship between correlation coefficient, r, and the slope, b, of the least squares line:

26 Linear correlation coefficient  1  r  +1

27 Calculating the Correlation Coefficient, r

28 Paired Data

29 Scatter Diagram

30 Find the Least Squares Line

31 Finding the slope

32 Finding the y-intercept

33 The equation of the least squares line is: y = a + bx y = 2.8 + 1.7x

34 To Compute r: Complete a table, with columns listing x, y, x 2, y 2, xy Compute SS xy, SS x, and SS y Use the formula:

35 Find the Correlation Coefficient

36 Calculations:

37 The Correlation Coefficient, r = 0.9753643 r  0.98

38 AP Statistics, Section 3.2, Part 138 Calculating Correlation The calculation of correlation is based on mean and standard deviation. Remember that both mean and standard deviation are not resistant measures.

39 AP Statistics, Section 3.2, Part 139 Calculating Correlation What does the contents of the parenthesis look like? What happens when the values are both from the lower half of the population? From the upper half? Both z-values are negative. Their product is positive. Both z-values are positive. Their product is positive. The formula for calculating z- values.

40 AP Statistics, Section 3.2, Part 140 Calculating Correlation What happens when one value is from the lower half of the population but other value is from the upper half? One z-value is positive and the other is negative. Their product is negative.

41 AP Statistics, Section 3.2, Part 141 Using the TI-83/84 to calculate r With Diagnostics ON: Run LinReg(a+bx) [STAT>CALC>option 8] with the explanatory variable as the first list, and response variable as the second list The results are the slope and vertical intercept of the regression equation (more on that later) and values of r and r 2. (More on r 2 check next handout ;)

42 Predictive Potential Coefficient of Determination –r² –Amount of variance accounted for in y by x –Percentage increase in accuracy you gain by using the regression line to make predictions –Without correlation, you can only guess the mean of y –[Used with regression] 20%0%80%100%60%40% Understanding r-squared actvity

43 Limitations of Correlation linearity: –can’t describe (accurately) non-linear relationships –e.g., flavor and % eaten, thickness and strength truncation of range: –underestimate strength of relationship if you can’t see full range of x value no proof of causation –third variable problem: could be 3 rd variable causing change in both variables directionality: can’t be sure which way causality “flows” “We don’t get it” – what does it have to do with that f#$%@! Line? That is for another session…

44 Regression Regression: Correlation + Prediction –predicting y based on x –e.g., predicting…. throwing points (y) based on distance from target (x) Regression equation –formula that specifies a line –y’ = a + bx –plug in a x value (distance from target) and predict y (points) –note y= actual value of a score y’= predict value Data Handout –Test takers, planets, darts

45 AP Statistics, Section 3.3, Part 145 The Least-Square Regression Finds the best fit line by trying to minimize the areas formed by the difference of the real data from the values predicted by the model.

46 AP Statistics, Section 3.3, Part 146 The Least-Square Regression Statisticians use a slightly different version of “slope-intercept” form. Slope is the product of r value and std dev ratio Y-intercept is the value found using the avg x and avg y

47 Regression Graphic – Regression Line if x=18 then… y’=47 if x=24 then… y’=20

48 AP Statistics, Section 3.3, Part 148 Predicting Model To put the regression line on the graph use the Statistics:Eq:RegEQ from the Vars menu to put the Y 1 equation. Then you can use Trace or Table or Y 1 to find response values that correspond to particular experimental values.

49 Regression Equation y’= a + bx –y’ = predicted value of y –b = slope of the line –x = value of x that you plug-in –a = y-intercept (where line crosses y axis) In the dart throwing case…. –y’ = 125.401 - 4.263(x) 20So if the distance is 20 feet 20 –y’ = 125.401 - 4.263( 20 ) –y’ = 125.401 -85.26 –y’ = 40.141 See STAT – CALC – LinReg: a + bx

50 Drawing a Regression Line by Hand Four steps 1.Use the y-intercept (if possible; does it have meaning =interval vs. rational) 2.Plot the average point (mean x, mean y) 3.Plug in a large value for x (just so it falls on the right end of the graph), plug it in for x, then plot the resulting point 4.Connect the three points with a straight line!

51 AP Statistics, Section 3.3, Part 151 Residuals It is important to note that the observed value almost never match the predicted values exactly The difference between the observed value and predicted has a special name: residual Observed Value: (y) Predicted Value ( ) Residual:

52 AP Statistics, Section 3.3, Part 152 Residual Plots You can plot the residuals to see if the there is any trends with the quality of the predictive model Try looking in the List menu for “RESID:”

53 AP Statistics, Section 3.3, Part 153 Residual Plots This residual shows no tendencies. It is equally bad throughout. This suggests that the original relationship is linear.

54 AP Statistics, Section 3.3, Part 1 54 “Pattern” =Not Linear “Well Distributed”=Linear

55 Predictive Ability Mantra!! –As variability decreases, prediction accuracy __________ –if we can account for variance, we can make better predictions As r increases: –r² increases “variance accounted for” increases the prediction accuracy increases –prediction error decreases (distance between y’ and y) –Sy decreases the standard error of the residual/predictor measures overall amount of prediction error –It can be thought of like this …

56 Thanks – Peace ! We like big r’s and we cannot lie!!! You other brothers can’t deny!!! Check out those residuals son and plot em with your TI-84 on Cause if they don’t look all scattered and patterned then your least squared line is shattered Then I only want that - if your scale and r squared is fat So kick out those nasty outliers When your correlation factor is on BABY GOT STATS!


Download ppt "–Working with relationships between two variables “Donation “ made to teacher & Stats Test Score."

Similar presentations


Ads by Google