ΣΥΣΧΕΤΙΣΗ & ΠΑΛΙΝΔΡΟΜΗΣΗ

Σχετικά έγγραφα
Μηχανική Μάθηση Hypothesis Testing

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

Section 8.3 Trigonometric Equations

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Στατιστική Ανάλυση Δεδομένων II. Γραμμική Παλινδρόμηση με το S.P.S.S.

EE512: Error Control Coding

2 Composition. Invertible Mappings

6.3 Forecasting ARMA processes

Other Test Constructions: Likelihood Ratio & Bayes Tests

Πολλαπλή Παλινδρόμηση

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Repeated measures Επαναληπτικές μετρήσεις

4.6 Autoregressive Moving Average Model ARMA(1,1)

5.4 The Poisson Distribution.

Queensland University of Technology Transport Data Analysis and Modeling Methodologies

Math 6 SL Probability Distributions Practice Test Mark Scheme

Homework 3 Solutions

Biostatistics for Health Sciences Review Sheet

ST5224: Advanced Statistical Theory II

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Section 9.2 Polar Equations and Graphs

Approximation of distance between locations on earth given by latitude and longitude

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Supplementary Appendix

Example Sheet 3 Solutions

Concrete Mathematics Exercises from 30 September 2016

Section 7.6 Double and Half Angle Formulas

FORMULAS FOR STATISTICS 1

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Statistics & Research methods. Athanasios Papaioannou University of Thessaly Dept. of PE & Sport Science

ΣΤΑΤΙΣΤΙΚΗ ΕΠΙΧΕΙΡΗΣΕΩΝ ΕΙΔΙΚΑ ΘΕΜΑΤΑ. Κεφάλαιο 13. Συμπεράσματα για τη σύγκριση δύο πληθυσμών

Math221: HW# 1 solutions

TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics

Solutions to Exercise Sheet 5

Matrices and Determinants

Statistical Inference I Locally most powerful tests

The Simply Typed Lambda Calculus

Every set of first-order formulas is equivalent to an independent set

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Numerical Analysis FMN011

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET

the total number of electrons passing through the lamp.

( ) ( ) STAT 5031 Statistical Methods for Quality Improvement. Homework n = 8; x = 127 psi; σ = 2 psi (a) µ 0 = 125; α = 0.

ΣΤΑΤΙΣΤΙΚΗ ΕΠΙΧΕΙΡΗΣΕΩΝ ΕΙΔΙΚΑ ΘΕΜΑΤΑ. Κεφάλαιο 16. Απλή Γραμμική Παλινδρόμηση και Συσχέτιση

Solution Series 9. i=1 x i and i=1 x i.

EXERCISES: 2.57, 2.58, 2.63, 11.33, 11.34

Instruction Execution Times

C.S. 430 Assignment 6, Sample Solutions

χ 2 test ανεξαρτησίας

Finite Field Problems: Solutions

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

derivation of the Laplacian from rectangular to spherical coordinates

Strain gauge and rosettes

PARTIAL NOTES for 6.1 Trigonometric Identities

Areas and Lengths in Polar Coordinates

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

1) Formulation of the Problem as a Linear Programming Model

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

HW 3 Solutions 1. a) I use the auto.arima R function to search over models using AIC and decide on an ARMA(3,1)

Κεφάλαιο 16 Απλή Γραμμική Παλινδρόμηση και Συσχέτιση

Lecture 34 Bootstrap confidence intervals

Problem Set 3: Solutions

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

HISTOGRAMS AND PERCENTILES What is the 25 th percentile of a histogram? What is the 50 th percentile for the cigarette histogram?

Areas and Lengths in Polar Coordinates

PENGARUHKEPEMIMPINANINSTRUKSIONAL KEPALASEKOLAHDAN MOTIVASI BERPRESTASI GURU TERHADAP KINERJA MENGAJAR GURU SD NEGERI DI KOTA SUKABUMI

Reminders: linear functions

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Potential Dividers. 46 minutes. 46 marks. Page 1 of 11

Exercise 2: The form of the generalized likelihood ratio

Exercises to Statistics of Material Fatigue No. 5

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Homework for 1/27 Due 2/5

519.22(07.07) 78 : ( ) /.. ; c (07.07) , , 2008

APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 651 APPENDIX B. BIBLIOGRAPHY 677 APPENDIX C. ANSWERS TO SELECTED EXERCISES 679

( ) 2 and compare to M.

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

1. Ηλεκτρικό μαύρο κουτί: Αισθητήρας μετατόπισης με βάση τη χωρητικότητα

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Second Order Partial Differential Equations

Srednicki Chapter 55

Αν οι προϋποθέσεις αυτές δεν ισχύουν, τότε ανατρέχουµε σε µη παραµετρικό τεστ.

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Απλή Ευθύγραµµη Συµµεταβολή

(Στατιστική Ανάλυση) Δεδομένων I. Σύγκριση δύο πληθυσμών (με το S.P.S.S.)

Υπολογιστική Φυσική Στοιχειωδών Σωματιδίων


The challenges of non-stable predicates

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Transcript:

ΣΥΣΧΕΤΙΣΗ & ΠΑΛΙΝΔΡΟΜΗΣΗ Για να προσδιορίσουμε την ύπαρξη σχέσης μεταξύ μεταβλητών, χρησιμοποιούμε την ανάλυση συσχέτισης. Για να προβλέψουμε την τιμή μιας μεταβλητής (εξαρτημένη μεταβλητή) με τη βοήθεια άλλων μεταβλητών (ανεξάρτητες μεταβλητές) χρησιμοποιούμε την ανάλυση παλινδρόμησης. Εξαρτημένη μεταβλητή: Y Ανεξάρτητες μεταβλητές: X 1, X 2,, X k Διαχείριση Πληροφοριών 11.1

ΣΥΣΧΕΤΙΣΗ & ΠΑΛΙΝΔΡΟΜΗΣΗ (συνέχεια) Η σχέση μεταξύ δύο μεταβλητών είναι γνωστή σαν απλή γραμμική παλινδρόμηση. Μαθηματικές εξισώσεις που περιγράφουν σχέσεις μεταξύ μεταβλητών λέγονται μοντέλα και εντάσσονται σε δύο κατηγορίες: προσδιοριστικά και πιθανοτικά. Διαχείριση Πληροφοριών 11.2

ΕΙΔΗ ΜΟΝΤΕΛΩΝ ΠΡΟΣΔΙΟΡΙΣΤΙΚΑ ΜΟΝΤΕΛΑ: είναι ένα σύνολο εξισώσεων που προσδιορίζουν πλήρως την τιμή της εξαρτημένης μεταβλητής με τη βοήθεια των ανεξάρτητων μεταβλητών. Σε αντίθεση ΠΙΘΑΝΟΤΙΚΑ ΜΟΝΤΕΛΑ: είναι η διαδικασία περιγραφής της τυχαιότητας που είναι αναπόσπαστο κομμάτι της καθημερινής μαςζωής. Π.χ. είναι η τιμή της βενζίνης σε όλα τα πρατήρια ίδια; Διαχείριση Πληροφοριών 11.3

ΕΙΔΗ ΜΟΝΤΕΛΩΝ (συνέχεια) Ένα πιθανοτικό μοντέλο αποτελείται από δύο συνιστώσες: την προσδιοριστική συνιστώσα που περιγράφει προσεγγιστικά την υπό μελέτη σχέση και την τυχαία συνιστώσα που μετράει το σφάλμα της προσδιοριστικής συνιστώσας. Προσδιοριστική συνιστώσα: Το κόστος κατασκευής ενός νέου σπιτιού είναι περίπου 1.000 το μ 2 και το κόστος αγοράς του οικοπέδου ανέρχεται συνήθως σε 100.000. Συνεπώς η τιμή πώλησης (y) ενός νέου σπιτιού θα είναι περίπου: y = 100.000 + (1.000 /μ 2 )(x) (όπου x είναι το μέγεθος του σπιτιού σε μ 2 ) Διαχείριση Πληροφοριών 11.4

ΠΑΡΑΔΕΙΓΜΑ Το μοντέλο που περιγράφει τη σχέση μεταξύ μεγέθους σπιτιού (ανεξάρτητη μεταβλητή) και τιμή πώλησης/μ 2 είναι: Τιμή/μ 2 Τιμή οικοπέδου 100.000 Η τιμή πώλησης προσδιορίζεται πλήρως από το μέγεθος. Μέγεθος σπιτιού Διαχείριση Πληροφοριών 11.5

ΠΑΡΑΔΕΙΓΜΑ (συνέχεια) Στην πραγματικότητα όμως οι τιμές πώλησης των κατοικιών με ίδιο εμβαδόν διαφοροποιούνται: Τιμή κατοικίας Κατώτερη - Ανώτερη Μεταβλητότητα Τιμή οικοπέδου 100.000 Τιμή κατοικίας = 100.000 + 1.000(Size) + x Ίδιο εμβαδόν αλλά διαφορετικές τιμές (π.χ. διαφορετικό επίπεδο κατασκευής) Μέγεθος σπιτιού Διαχείριση Πληροφοριών 11.6

ΠΑΡΑΔΕΙΓΜΑ (συνέχεια) Η τιμή πώλησης της κατοικίας περιγράφεται με το πιθανοτικό μοντέλο: y = 100.000 + 100x + ε όπου ε (ελληνικό γράμμα) είναι η τυχαία συνιστώσα, εκφράζει τη διαφορά μεταξύ της πραγματικής τιμής πώλησης και της εκτιμούμενης τιμής με βάση το μέγεθος της κατοικίας. Η τιμή του μεταβάλλεταιits value will vary from house sale to house sale, even if the square footage (i.e. x) remains the same. Διαχείριση Πληροφοριών 11.7

Simple Linear Regression Model A straight line model with one independent variable is called a first order linear model or a simple linear regression model. Its is written as: dependent variable independent variable y-intercept slope of the line error variable Διαχείριση Πληροφοριών 11.8

Simple Linear Regression Model Note that both and are population parameters which are usually unknown and hence estimated from the data. y rise run =slope (=rise/run) =y-intercept x Διαχείριση Πληροφοριών 11.9

Estimating the Coefficients In much the same way we base estimates of µ on x, we estimate β 0 using b 0 and β 1 using b 1, the y-intercept and slope (respectively) of the least squares or regression line given by: (Recall: this is an application of the least squares method and it produces a straight line that minimizes the sum of the squared differences between the points and the line) Διαχείριση Πληροφοριών 11.10

Example 16.1 The annual bonuses ($1,000s) of six employees with different years of experience were recorded as follows. We wish to determine the straight line relationship between annual bonus and years of experience. Years of experience x 1 2 3 4 5 6 Annual bonus y 6 1 9 5 17 12 Xm16-01 Διαχείριση Πληροφοριών 11.11

Least Squares Line Example 16.1 these differences are called residuals Διαχείριση Πληροφοριών 11.12

Example 16.2 Car dealers across North America use the "Red Book" to help them determine the value of used cars that their customers trade in when purchasing new cars. The book, which is published monthly, lists the trade-in values for all basic models of cars. It provides alternative values for each car model according to its condition and optional features. The values are determined on the basis of the average paid at recent used-car auctions, the source of supply for many used-car dealers. Διαχείριση Πληροφοριών 11.13

Example 16.2 However, the Red Book does not indicate the value determined by the odometer reading, despite the fact that a critical factor for used-car buyers is how far the car has been driven. To examine this issue, a used-car dealer randomly selected 100 threeyear old Toyota Camrys that were sold at auction during the past month. The dealer recorded the price ($1,000) and the number of miles (thousands) on the odometer. (Xm16-02). The dealer wants to find the regression line. Διαχείριση Πληροφοριών 11.14

Example 16.2 Click Data, Data Analysis, Regression Διαχείριση Πληροφοριών 11.15

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Example 16.2 A B C D E F SUMMARY OUTPUT Regression Statistics Multiple R 0.8052 R Square 0.6483 Adjusted R Square 0.6447 Standard Error 0.3265 Observations 100 Lots of good statistics calculated for us, but for now, all we re interested in is this ANOVA df SS MS F Significance F Regression 1 19.26 19.26 180.64 5.75E-24 Residual 98 10.45 0.11 Total 99 29.70 Coefficients Standard Error t Stat P-value Intercept 17.25 0.182 94.73 3.57E-98 Odometer -0.0669 0.0050-13.44 5.75E-24 Διαχείριση Πληροφοριών 11.16

Example 16.2 INTERPRET As you might expect with used cars The slope coefficient, b 1, is 0.0669, that is, each additional mile on the odometer decreases the price by $.0669 or 6.69 The intercept, b 0, is 17,250. One interpretation would be that when x = 0 (no miles on the car) the selling price is $17,250. However, we have no data for cars with less than 19,100 miles on them so this isn t a correct assessment. Διαχείριση Πληροφοριών 11.17

Example 16.2 INTERPRET Selecting line fit plots on the Regression dialog box, will produce a scatter plot of the data and the regression line Διαχείριση Πληροφοριών 11.18

Required Conditions For these regression methods to be valid the following four conditions for the error variable ( ) must be met: The probability distribution of is normal. The mean of the distribution is 0; that is, E( ) = 0. The standard deviation of is, which is a constant regardless of the value of x. The value of associated with any particular value of y is independent of associated with any other value of y. Διαχείριση Πληροφοριών 11.19

Assessing the Model The least squares method will always produce a straight line, even if there is no relationship between the variables, or if the relationship is something other than linear. Hence, in addition to determining the coefficients of the least squares line, we need to assess it to see how well it fits the data. We ll see these evaluation methods now. They re based on the sum of squares for errors (SSE). Διαχείριση Πληροφοριών 11.20

Sum of Squares for Error (SSE) The sum of squares for error is calculated as: SSE n i 1 (yi ŷi) 2 and is used in the calculation of the standard error of estimate: If is zero, all the points fall on the regression line. Διαχείριση Πληροφοριών 11.21

Standard Error of Estimate If s ε is small, the fit is excellent and the linear model should be used for forecasting. If s ε is large, the model is poor But what is small and what is large? Διαχείριση Πληροφοριών 11.22

Standard Error of Estimate Judge the value of by comparing it to the sample mean of the dependent variable ( ). In this example, s ε =.3265 and = 14.841 so (relatively speaking) it appears to be small, hence our linear regression model of car price as a function of odometer reading is good. Διαχείριση Πληροφοριών 11.23

Testing the Slope If no linear relationship exists between the two variables, we would expect the regression line to be horizontal, that is, to have a slope of zero. We want to see if there is a linear relationship, i.e. we want to see if the slope (β 1 ) is something other than zero. Our research hypothesis becomes: H 1 : β 1 0 Thus the null hypothesis becomes: H 0 : β 1 = 0 Διαχείριση Πληροφοριών 11.24

Testing the Slope We can implement this test statistic to try our hypotheses: where is the standard deviation of b 1, defined as: If the error variable ( ) is normally distributed, the test statistic has a Student t-distribution with n 2 degrees of freedom. The rejection region depends on whether or not we re doing a one- or two- tail test (two-tail test is most typical). Διαχείριση Πληροφοριών 11.25

Example 16.4 Test to determine if there is a linear relationship between the price & odometer readings (at 5% significance level) We want to test: H 1 : β 1 0 H 0 : β 1 = 0 (if the null hypothesis is true, no linear relationship exists) The rejection region is: Διαχείριση Πληροφοριών 11.26

Example 16.4 COMPUTE We can compute t manually or refer to our Excel output p-value We see that the t statistic for odometer (i.e. the slope, b 1 ) is 13.49 Compare which is greater than t Critical = 1.984. We also note that the p-value is 0.000. There is overwhelming evidence to infer that a linear relationship between odometer reading and price exists. Διαχείριση Πληροφοριών 11.27

Testing the Slope If we wish to test for positive or negative linear relationships we conduct one-tail tests, i.e. our research hypothesis become: or H 1 : β 1 < 0 (testing for a negative slope) H 1 : β 1 >0 (testing for a positive slope) Of course, the null hypothesis remains: H 0 : β 1 = 0. Διαχείριση Πληροφοριών 11.28

Coefficient of Determination Tests thus far have shown if a linear relationship exists; it is also useful to measure the strength of the relationship. This is done by calculating the coefficient of determination R 2. The coefficient of determination is the square of the coefficient of correlation (r), hence R 2 = (r) 2 Διαχείριση Πληροφοριών 11.29

Coefficient of Determination As we did with analysis of variance, we can partition the variation in y into two parts: Variation in y = SSE + SSR SSE Sum of Squares Error measures the amount of variation in y that remains unexplained (i.e. due to error) SSR Sum of Squares Regression measures the amount of variation in y explained by variation in the independent variable x. Διαχείριση Πληροφοριών 11.30

Coefficient of Determination COMPUTE We can compute this manually or with Excel Διαχείριση Πληροφοριών 11.31

Coefficient of Determination INTERPRET R 2 has a value of.6483. This means 64.83% of the variation in the auction selling prices (y) is explained by the variation in the odometer readings (x). The remaining 35.17% is unexplained, i.e. due to error. Unlike the value of a test statistic, the coefficient of determination does not have a critical value that enables us to draw conclusions. In general the higher the value of R 2, the better the model fits the data. R 2 = 1: Perfect match between the line and the data points. R 2 = 0: There are no linear relationship between x and y. Διαχείριση Πληροφοριών 11.32

More on Excel s Output An analysis of variance (ANOVA) table for the simple linear regression model can be give by: Source degrees of freedom Sums of Squares Mean Squares F-Statistic Regression 1 SSR Error n 2 SSE MSR = SSR/1 MSE = SSE/(n 2) F=MSR/MSE Total n 1 Variation in y Διαχείριση Πληροφοριών 11.33

Coefficient of Correlation We can use the coefficient of correlation (introduced earlier) to test for a linear relationship between two variables. Recall: The coefficient of correlation s range is between 1 and +1. If r = 1 (negative association) or r = +1 (positive association) every point falls on the regression line. If r = 0 there is no linear pattern Διαχείριση Πληροφοριών 11.34

Coefficient of Correlation The population coefficient of correlation is denoted (rho) We estimate its value from sample data with the sample coefficient of correlation: The test statistic for testing if = 0 is: Which is Student t-distributed with n 2 degrees of freedom. Διαχείριση Πληροφοριών 11.35

Example 16.6 We can conduct the t-test of the coefficient of correlation as an alternate means to determine whether odometer reading and auction selling price are linearly related. Our research hypothesis is: H 1 : ρ 0 (i.e. there is a linear relationship) and our null hypothesis is: H 0 : ρ = 0 (i.e. there is no linear relationship when ρ = 0) Διαχείριση Πληροφοριών 11.36

Example 16.6 COMPUTE We ve already shown that: Hence we calculate the coefficient of correlation as: and the value of our test statistic becomes: Διαχείριση Πληροφοριών 11.37

Example 16.6 COMPUTE We can also use Excel > Add-Ins > Data Analysis Plus and the Correlation (Pearson) tool to get this output: We can also do a one-tail test for positive or negative linear relationships p-value compare Again, we reject the null hypothesis (that there is no linear correlation) in favor of the alternative hypothesis (that our two variables are in fact related in a linear fashion). Διαχείριση Πληροφοριών 11.38

Using the Regression Equation We could use our regression equation: y = 17.250.0669x to predict the selling price of a car with 40 (,000) miles on it: y = 17.250.0669x = 17.250.0669(40) = 14,574 We call this value ($14,574) a point prediction. Chances are though the actual selling price will be different, hence we can estimate the selling price in terms of an interval. Διαχείριση Πληροφοριών 11.39

Prediction Interval The prediction interval is used when we want to predict one particular value of the dependent variable, given a specific value of the independent variable: (x g is the given value of x we re interested in) Διαχείριση Πληροφοριών 11.40

Prediction Interval Predict the selling price of a 3-year old Camry with 40,000 miles on the odometer (x g = 40) We predict a selling price between $13,925 and $15,226. Διαχείριση Πληροφοριών 11.41

Confidence Interval Estimator of the expected value of y. In this case, we are estimating the mean of y given a value of x: (Technically this formula is used for infinitely large populations. However, we can interpret our problem as attempting to determine the average selling price of all Toyota Camrys, all with 40,000 miles on the odometer) Διαχείριση Πληροφοριών 11.42

Confidence Interval Estimator Estimate the mean price of a large number of cars (x g = 40): The lower and upper limits of the confidence interval estimate of the expected value are $14,498 and $14,650 Διαχείριση Πληροφοριών 11.43

What s the Difference? Prediction Interval Confidence Interval 1 no 1 Used to estimate the value of one value of y (at given x) Used to estimate the mean value of y (at given x) The confidence interval estimate of the expected value of y will be narrower than the prediction interval for the same given value of x and confidence level. This is because there is less error in estimating a mean value as opposed to predicting an individual value. Διαχείριση Πληροφοριών 11.44

Intervals with Excel COMPUTE Add-Ins > Data Analysis Plus > Prediction Interval Point Prediction Prediction Interval Confidence Interval Estimator of the mean price Διαχείριση Πληροφοριών 11.45

Regression Diagnostics There are three conditions that are required in order to perform a regression analysis. These are: The error variable must be normally distributed, The error variable must have a constant variance, & The errors must be independent of each other. How can we diagnose violations of these conditions? Residual Analysis, that is, examine the differences between the actual data points and those predicted by the linear equation Διαχείριση Πληροφοριών 11.46

Residual Analysis Recall the deviations between the actual data points and the regression line were called residuals. Excel calculates residuals as part of its regression analysis: We can use these residuals to determine whether the error variable is nonnormal, whether the error variance is constant, and whether the errors are independent Διαχείριση Πληροφοριών 11.47

Nonnormality We can take the residuals and put them into a histogram to visually check for normality we re looking for a bell shaped histogram with the mean close to zero. Διαχείριση Πληροφοριών 11.48

Heteroscedasticity When the requirement of a constant variance is violated, we have a condition of heteroscedasticity. We can diagnose heteroscedasticity by plotting the residual against the predicted y. Διαχείριση Πληροφοριών 11.49

Heteroscedasticity If the variance of the error variable ( ) is not constant, then we have heteroscedasticity. Here s the plot of the residual against the predicted value of y: there doesn t appear to be a change in the spread of the plotted points, therefore no heteroscedasticity Διαχείριση Πληροφοριών 11.50

Nonindependence of the Error Variable If we were to observe the auction price of cars every week for, say, a year, that would constitute a time series. When the data are time series, the errors often are correlated. Error terms that are correlated over time are said to be autocorrelated or serially correlated. We can often detect autocorrelation by graphing the residuals against the time periods. If a pattern emerges, it is likely that the independence requirement is violated. Διαχείριση Πληροφοριών 11.51

Nonindependence of the Error Variable Patterns in the appearance of the residuals over time indicates that autocorrelation exists: Note the runs of positive residuals, replaced by runs of negative residuals Note the oscillating behavior of the residuals around zero. Διαχείριση Πληροφοριών 11.52

Outliers An outlier is an observation that is unusually small or unusually large. E.g. our used car example had odometer readings from 19.1 to 49.2 thousand miles. Suppose we have a value of only 5,000 miles (i.e. a car driven by an old person only on Sundays ) this point is an outlier. Διαχείριση Πληροφοριών 11.53

Outliers Possible reasons for the existence of outliers include: There was an error in recording the value The point should not have been included in the sample Perhaps the observation is indeed valid. Outliers can be easily identified from a scatter plot. If the absolute value of the standard residual is > 2, we suspect the point may be an outlier and investigate further. They need to be dealt with since they can easily influence the least squares line Διαχείριση Πληροφοριών 11.54

Procedure for Regression Diagnostics 1. Develop a model that has a theoretical basis. 2. Gather data for the two variables in the model. 3. Draw the scatter diagram to determine whether a linear model appears to be appropriate. Identify possible outliers. 4. Determine the regression equation. 5. Calculate the residuals and check the required conditions 6. Assess the model s fit. 7. If the model fits the data, use the regression equation to predict a particular value of the dependent variable and/or estimate its mean. Διαχείριση Πληροφοριών 11.55

Η ψηφιοποίηση του εκπαιδευτικού υλικού έγινε στο πλαίσιο υλοποίησης της πράξης με τίτλο «ΕΝΙΣΧΥΣΗ ΣΠΟΥΔΩΝ ΠΛΗΡΟΦΟΡΙΚΗΣ στο ΤΕΙ ΚΑΒΑΛΑΣ», του Μέτρου 2.2 «Αναμόρφωση Προγραμμάτων Σπουδών - Διεύρυνση Τριτοβάθμιας Εκπαίδευσης» του ΕΠΕΑΕΚ ΙΙ, που συγχρηματοδοτείται από το Ευρωπαϊκό Κοινωνικό Ταμείο (Ε.Κ.Τ.) κατά 80% και Εθνικούς πόρους κατά 20%. Διαχείριση Πληροφοριών