Preview

Linear Regression Models Study Guide

Good Essays
Open Document
Open Document
1398 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Linear Regression Models Study Guide
LINEAR REGRESSION MODELS W4315
HOMEWORK 2 ANSWERS February 15, 2010

Instructor: Frank Wood 1. (20 points) In the file ”problem1.txt”(accessible on professor’s website), there are 500 pairs of data, where the first column is X and the second column is Y. The regression model is Y = β0 + β1 X + a. Draw 20 pairs of data randomly from this population of size 500. Use MATLAB to run a regression model specified as above and keep record of the estimations of both β0 and β1 . Do this 200 times. Thus you will have 200 estimates of β0 and β1 . For each parameter, plot a histogram of the estimations. b. The above 500 data are actually generated by the model Y = 3 + 1.5X + , where ∼ N (0, 22 ). What is the exact distribution of the estimates of β0 and β1 ? c. Superimpose the curve of the estimates’ density functions from part b. onto the two histograms respectively. Is the histogram a close approximation of the curve? Answer: First, read the data into Matlab. pr1=textread(’problem1.txt’); V1=pr1(1:250,1); V2=pr1(1:250,2); T1=pr1(251:500,1); T2=pr1(251:500,2); X=[V1;V2]; Y=[T1;T2]; Randomly draw 20 pairs of (X,Y) from the original data set, calculate the coefficients b0 and b1 and repeat the process for 200 times b0=zeros(200,1); b1=zeros(200,1); i=0 for i=1:200 indx=randsample(500,20); x=X(indx); 1

y=Y(indx); avg x = mean(x); avg y = mean(y); sxx = sum((x − avg x).2 ); sxy = sum((x − avg x). ∗ (y − avg y)); b1(i) = sxy/sxx; b0(i) = avg y − b1(i) ∗ avg x; end; Draw histograms of the coefficients b0 and b1 hist(b0) hist(b1)

Figure 1: Histogram of b0

Figure 2: Histogram of b1

2

i b. As we have known, b1 = i i(Xi −X)2 = i (Xii −X)2i = i Ki Yi whereKi = Xi −X¯ 2 ¯ ¯ i i i (Xi −X) So, b1 is a linear combination of Yi . Since Yi has a normal distribution, b1 also follows a normal distribution. E(b1 ) = i Ki E(Yi ) = i Ki (β0 + β1 Xi ) = i Ki β0 + ( i Ki Xi )β1 ¯ i (Xi −X) =0 ¯ i Ki = (Xi −X)2 i i i i i i i =1 ¯ 2 = ¯ 2 i Ki X i = i (Xi −X) i (Xi −X) E(b1 ) = 0 + 1 ∗ β1

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Unit 421 Unit 7

    • 686 Words
    • 3 Pages

    in Figure 1, which is a Gantt chart along with a histogram. Now, examine Figure 1 closely. Using the…

    • 686 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 3

    • 1201 Words
    • 5 Pages

    17. Suppose X is a random variable with mean µX and standard deviation σX. Suppose Y is a random variable with mean µY and standard deviation σY. The mean of X + Y is…

    • 1201 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Week 3 Text Paper Psy 315

    • 897 Words
    • 4 Pages

    Explain what you have done to a person who has never had a course in statistics.…

    • 897 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    ASW text. You may also purchase a hard copy from the site if you would like—optional.…

    • 2121 Words
    • 9 Pages
    Satisfactory Essays
  • Better Essays

    Variance = (0.10 x [.07-.07]2)+ (0.20 x [.07-.07]2) + (0.40 x [.07-.07]2) + (0.20 x [.07-.07]2) + (0.10 x [.07-.07]2) = 0…

    • 1578 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Boardman Management Group

    • 601 Words
    • 3 Pages

    The Histograms is a vertical bar graph that will show numerical information and frequency of distribution of continuous data and will allow for a range of data. The Histogram also will show the deviations from the norm and can…

    • 601 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    St 101 Question Paper

    • 2716 Words
    • 11 Pages

    Suppose that a Normal model describes the acidity (pH) of rainwater, and the water tested after last week's storm had a z-score of 1.8. This means that the acidity of that rain a. had a pH of 1.8 b. varied with a standard deviation of 1.8 c. had a pH 1.8 higher than the average rainfall d. had a pH 1.8 times that of average rainwater e. had a pH 1.8 standard deviations higher than that of average rainwater 16. The highway gas mileage B, measured in miles per gallon (mpg), of 26 models of midsize cars, have the following summary statistics: B œ 26.54 mpg, median œ 26 mpg, = œ 3.04 mpg, IQR œ 3 mpg. If you convert gas mileage B from miles per gallon to B8/A which is measured in miles per liter, what are the new values of the summary statistics? (3.785 liters œ 1 gallon). 17. Shown below is the normal probability plot for 200 monthly telephone…

    • 2716 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    #6: Bloodshed in Aleppo The article, “ From Aleppo, tales of hardship and bloodshed. ‘Civilization is gone.’” written by Molly Hennessy-Fiske talks about the hardships of living in present day Aleppo, Syria. To begin with, Syria has been in a civil war for over five years now and the people still stay in the country. The war has been deadly but the people are still strong and are not willing to leave.…

    • 265 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Centripetal Force Lab Activity Analysis: 1. A) Average Percent Difference: 50g: (values expressed in newtons) Step 1: Calculate the average value of the two variables Average Value= Value 1+ Value 2 /2 = 0.49+ 0.61/2 = 1.1/2 = 0.55 Step 2: Calculate the difference between the two variables Difference= Value 2- Value 1 =…

    • 1634 Words
    • 7 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Study Guide

    • 2971 Words
    • 12 Pages

    The Streaming Media Services role enables an application server to provide digital audio and video content to network clients in real time by using HTTP or the Real Time Streaming Protocol (RTSP). The clients run a media player application that processes the content as they receive it from the server.…

    • 2971 Words
    • 12 Pages
    Satisfactory Essays
  • Powerful Essays

    Study Guide

    • 1753 Words
    • 8 Pages

    First, receipt of electronically submitted claims through electronic data interchange and receipt of paper claims. Next, initial auto adjudication first pass then a second- attempt auto adjudication following resolution of certain suspension edits. Manual processing for claims that cannot be auto-adjudicated, check writing process. The issuance of EOB and/ or remittance advice before completing appropriate prepayment and post payment analytics. Finally, arching claim records and data.…

    • 1753 Words
    • 8 Pages
    Powerful Essays
  • Powerful Essays

    study guide

    • 2043 Words
    • 9 Pages

    7. The coastal Plaines: Area of flat, low-lying land adjacent to a seacoast and separated from the interior by other features…

    • 2043 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    Exercise Week 3

    • 550 Words
    • 2 Pages

    3. Explore the distribution of the Age variable via histogram and moments. Overlay a Normal curve on the…

    • 550 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Study Guide

    • 1347 Words
    • 6 Pages

    COMPANY BACKGROUND: EasyFind manufactures and sells golf balls. The company is conducting a price test to find a better price point. Presently their golf balls sell for $19 per dozen. Their current volume is 5,470 dozen per month. They are considering reducing their sales price by 20% per dozen.…

    • 1347 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    1. Given the following information for a one-year project (see p. 285 for complete text of this exercise):…

    • 410 Words
    • 2 Pages
    Satisfactory Essays