Page 164 - Data Science Algorithms in a Week
P. 164

Regression


                          Then we would obtain the desired reversed model:

                             Call:
                             lm(formula = fahrenheit ~ celsius, data = temperatures)
                             Coefficients:
                             (Intercept)    celsius
                                    32.0        1.8
                          So degrees Fahrenheit can be expressed from degrees Celsius as: F=1.8*C+32.

                          We may obtain this formula alternatively by modifying the formula:

                          C=(5/9)*F-160/9

                          160/9+C=(5/9)*F
                          160+9*C=5*F F=1.8*C+32

                   3.  The estimated speed is so high because even flights over a short distance take
                      quite long: for example, the flight from London to Amsterdam, where the
                      distance between the two cities is only 365 km, takes about 1.167 hours. But, on
                      the other hand, if the distance changes only a little, then the flight time changes
                      only a little as well. This results in us estimating a very high initial setup time.
                      Consequently, the speed has to be very high because there is only a small amount
                      of time left to travel a certain distance.

                              If we consider very long flights where the initial setup time to flight time
                              ratio is much smaller, we could predict the flight speed more accurately.

                   4.  The number of the bacteria at the 5-minute intervals is: 47.5, 56.5, 67.2, and 79.9
                      millions. The differences between these numbers are: 9, 10.7, and 12.7. The
                      sequence is increasing. So we look at the ratios of the neighbor terms to see how
                      the sequence grows. 56.5/47.5=1.18947, 67.2/56.5=1.18938, and 79.9/67.2=1.18899.
                      The ratios of the successive terms are close to each other, so we have the reason to
                      believe that the number of the bacteria in the growing population can be
                      estimated using the exponential distribution by the model:



                                                  n = 47.7 * b m

                          Where n is the number of the bacteria in millions, b is a constant (the base),
                          the number m is the exponent expressing the number of the minutes since
                          10:00 which is the time of the first measurement, 47.7 is the number of the
                          bacteria at this measurement in millions.


                                                    [ 152 ]
   159   160   161   162   163   164   165   166   167   168   169