In: Statistics and Probability
Destination |
Departing Flight Numbers (list all departing flight segments) |
Distance (round to nearest mile) |
Amount |
Miami |
Delta 3899/ Delta 951 |
993 |
$328 |
San Diego |
Delta 3899/ Delta 1909 |
2,321 |
$609 |
New York City |
Delta 3899/ Delta 2021 |
555 |
$508 |
Chicago |
Delta 3899/ Delta 1608 |
516 |
$205 |
Seattle |
Delta 3899/Delta 3642 |
2,568 |
$491 |
Salt Lake City |
Delta 2899/ Delta 2611 |
1,831 |
$475 |
Boston |
Delta 2109/ Delta 665 |
744 |
$579 |
Honolulu |
Delta 876/ Delta 1559 |
4,594 |
$1,168 |
Denver |
Delta 3899/ Delta 2871 |
1,350 |
$415 |
*Fort Myers |
Delta 3899/ Delta 462 |
974 |
$395 |
Plotted on the horizontal axis is distance in miles to different cities, the vertical axis is price of flight of the flight to these cities
a. looking at the scatter plot, how is the cost of the trip associated with the distance of the trip
b. use a straight edge to approximate a line of best fit to the data
c. on a scale of 0 to 1 estimate how well the line fits the data. 0= no fit 1= perfect fit. How did we choose the value of 0 or 1
d. Find the equation based on your best fit line. HINT: To find the estimated equation, pick two points on the line and plug into Show your work. Write your equation in the form,
e
.Now, let’s calculate the least-squares line based on your data. Show your work. You can use the following table to assist you or you may use Excel if you are more comfortable with the software. Write your equation in the form, .
x |
y |
x2 |
xy |
y2 |
Determine the Sample Correlation Coefficient, .
a. Scater Plot
(horizontal axis is distance in miles to different cities, the vertical axis is price of flight of the flight to these cities)
Drow a Scater Plot Using Excel is as below,
b. Now, straight edge to approximate a line of best fit to the data is as below,
c. Estimate how well fit the line:
Using Excel we calculate correlation to estimate how well fit the line, So Correlation is 0.85.
d. Find the equation based on your best fit line:
Using Excel we calculate regression to estimate equation is,
Y = 230.292 + 0.175 * X
e. Calculate Coreelation coefficient,
Obs. | X | Y | X^2 | XY | Y^2 |
1 | 993 | 328 | 986049 | 325704 | 107584 |
2 | 2321 | 609 | 5387041 | 1413489 | 370881 |
3 | 555 | 508 | 308025 | 281940 | 258064 |
4 | 516 | 205 | 266256 | 105780 | 42025 |
5 | 2568 | 491 | 6594624 | 1260888 | 241081 |
6 | 1831 | 475 | 3352561 | 869725 | 225625 |
7 | 744 | 579 | 553536 | 430776 | 335241 |
8 | 4594 | 1168 | 21104836 | 5365792 | 1364224 |
9 | 1350 | 415 | 1822500 | 560250 | 172225 |
10 | 974 | 395 | 948676 | 384730 | 156025 |
Total | 16446 | 5173 | 41324104 | 10999074 | 3272975 |
Formula for calculate Correlation of Coefficient is,
So from the above table by using formula we calculated Correlation of Coefficient is = 0.8534