IT100 Session 5: Linear Equations
5 Sept 2017
Between points in 2D space: \( \large (x_1,y_1) \) and \( \large (x_2,y_2) \)
\[ \large Dist = \sqrt{(x_2-x_1)^2 + (y_2- y_1)^2} \]
Between points in 3D space: \( \large (x_1,y_1,z_1) \) and \( \large (x_2,y_2,z_2) \)
\[ \large Dist = \sqrt{(x_2-x_1)^2 + (y_2- y_1)^2 + (z_2- z_1)^2} \]
Between points in 4D space: \( \large (w_1,x_1,y_1,z_1) \) and \( \large (w_1,x_2,y_2,z_2) \)
\[ \large Dist = \sqrt{(w_2-w_1)^2 + (x_2-x_1)^2 + (y_2- y_1)^2 + (z_2- z_1)^2} \]
Distance between a point \( \large (x_0,y_0) \) and a line \( \large y= mx + b \)
\[ \large Dist = {|mx_0 + b - y_0|\over \sqrt{m^2 + 1}} \]
\[ \large\begin{array}{rcl} x_0&=& {(x +m y) - m b\over m^2 + 1}\\ & & \\ y_0 &=& {m(x + m y)+b\over m^2 + 1}\\ \end{array} \]
\[ \large\begin{array}{rcl} y &=& 2x + 2\\ & & \\ y &=& - {1\over 2}x + b_p \\ 5 &=& -{8\over 2} + b_p\\ 9 &=& b_p\\ & & \\ 2 x_0 + 2 &=& -{1\over 2} x_0 + 9\\ {5\over 2} x_0 &=& 7\\ x_0 &=&{14\over 5} = 2.8\\ & & \\ y_0 &=& 2 \times 2.8 + 2 = 7.6\\ \end{array} \]
\[ \large\begin{array}{rcl} Dist & = &\sqrt{(x_0 - x)^2 + (y_0 - y)^2 }\\ & & \\ Dist & = &\sqrt{(2.8 - 8)^2 + (7.6 - 5)^2 }\\ &=& \sqrt{5.2^2 + 2.6^2} = \sqrt{33.8}\\ &=& 5.8 \\ \end{array} \]
\[ \large Revenue = Cost \]
The Federal Helium Reserve held about \( \large 16 \times 10^9 \) cubic feet of helium in 2010 and is being depleted by about \( \large 2.1 \times 10^9 \) cubic feet each year.
Give a linear equation for the remaining federal helium reserves, R, in terms of t, the number of years since 2010.
What will the helium reserves be in 2015?
When will the Federal Helium Reserve be depleted if the trend continues?
Housing prices
Year | Indiana | Alabama |
---|---|---|
1940 | 35,700 | 17,100 |
2000 | 94,300 | 87,100 |
In 2012, a guest house had 1,001 visitors. By 2016, the number of visitors grew to 1,697. Assume linear growth.
Use these data to answer the following questions
Year | Pop |
---|---|
1990 | 11,500 |
1995 | 12,100 |
2000 | 12,700 |
2005 | 13,000 |
2010 | 13,750 |
The nearest road is the \( y= .33x + 20 \)
The village is located at \( (10,30) \)
chirps=c(44,35,
20.4,33,31,35,
18.5,37,26)
temp =c(80.5,70.5,
57,66,68,72,52,
73.5,53)
plot(chirps,temp,
pch=19,col="blue")
ln =
lm(temp ~ chirps)
abline(ln,col="red")
chirps(x) | temp (y) | (xy) | (x2) | (y2) | |
---|---|---|---|---|---|
1 | 18.5 | 52.0 | 962.0 | 342.25 | 2704.00 |
2 | 20.4 | 57.0 | 1162.8 | 416.16 | 3249.00 |
3 | 26.0 | 53.0 | 1378.0 | 676.00 | 2809.00 |
4 | 31.0 | 68.0 | 2108.0 | 961.00 | 4624.00 |
5 | 33.0 | 66.0 | 2178.0 | 1089.00 | 4356.00 |
6 | 35.0 | 70.5 | 2467.5 | 1225.00 | 4970.25 |
7 | 35.0 | 72.0 | 2520.0 | 1225.00 | 5184.00 |
8 | 37.0 | 73.5 | 2719.5 | 1369.00 | 5402.25 |
9 | 44.0 | 80.5 | 3542.0 | 1936.00 | 6480.25 |
\( \sum \) | 279.9 | 592.5 | 19037.80 | 9239.4 | 39778.8 |
Mean | 31.1 | 65.8 | 2115.3 | 1026.6 | 4419.9 |
\[ \large\begin{array}{rcl} \overline x &=& {\sum x \over n}\\ \\ \\ m &=& {\sum x y - \left(\overline x \sum y\right) \over \sum x^2 - n\left(\overline x\right)^2}\\ \\ \\ \\ b &=& \overline y - m \overline x\\ \end{array} \]
\[ \large\begin{array}{rcl} \overline x &=& {279.9 \over 9}\\ &=& 31.1\\ \\ m &=& {19037.8 - \left(31.1\times 592.5\right) \over 39778.8 - 9\left(31.1\right)^2}\\ &=& {19037.8 - 18426.8\over 9239.4 -8704.8} = {611.0 \over 534.2}\\ &=& 1.144\\ \\ b &=& 65.8 - 1.144\times 31.1\\ &=& 65.8 - 35.6\\ &=& 30.2\\ \end{array} \]
\[ \large\begin{array}{rcl} r &=& {\sum x y - n\bar x\bar y \over \sqrt{\left(\sum x^2 - n\bar x^2\right)}\ \sqrt{\left(\sum y^2 -n\bar y^2\right)}}\\ \\ r &=& {19037.80 - 9 \times 31.1 \times 65.8 \over \sqrt{\left(9239.4 - 9\times 31.1^2\right)}\sqrt{\left(39778.8 - 9\times 65.8^2\right)}}\\ &=& {19037.80 - 18417.42 \over \sqrt{9239.4 - 8704.9)}\ \sqrt{39778.8 - 38966.76}}\\ &=& {620.38 \over \sqrt{534.5}\ \sqrt{812.04}} = {620.38\over 23.12\times 28.5}\\ &=& {620.38\over 658.92} = 0.9415\\ \end{array} \]
Coefficients | Estimate | Std. Error | t value | Prob |
---|---|---|---|---|
(Intercept) | 30.2806 | 4.5048 | 6.722 | 0.000272 |
chirps | 1.1432 | 0.1406 | 8.131 | 8.22e-05 |
Statistic | Value |
---|---|
Residual standard error: | 3.251 on 7 DF |
Multiple R-squared: | 0.9043 |
Adjusted R-squared: | 0.8906 |
F-statistic: | 66.11 on 1 and 7 DF |
p-value: | 8.217e-05 |
Residuals: | Min | 1Q | Median | 3Q | Max |
---|---|---|---|---|---|
-7.0031 | -0.0803 | 0.5707 | 1.7083 | 3.3986 |
You are measuring the time required to weave silk cloth.
Time | cm |
---|---|
10 | 3 |
20 | 7 |
30 | 55 |
40 | 60 |
50 | 95 |
Te U.S. Census tracks the percentage of persons 25 years or older who are college graduates.
Determine if the trend is linear.
What line best describes the trend?
If the trend continues, in what year will the percentage exceed 35%?
Year | % Grad |
---|---|
1990 | 21.3 |
1992 | 21.4 |
1994 | 22.2 |
1996 | 23.6 |
1998 | 24.4 |
2000 | 25.6 |
2002 | 26.7 |
2004 | 27.7 |
2006 | 28.0 |
2008 | 29,4 |
Explain the disappearing square.