Tweaks, Trends, and Correlation Help (page 2)
The term interpolate means ''to put between.'' When a graph is incomplete, estimated data can be put in the gap(s) in order to make the graph look complete. An example is shown in Fig. 1-13. This is a graph of the price of the hypothetical Stock Y from Fig. 1-6, but there's a gap during the noon hour. We don't know exactly what happened to the stock price during that hour, but we can fill in the graph using linear interpolation. A straight line is placed between the end points of the gap, and then the graph looks complete.
Linear interpolation almost always produces a somewhat inaccurate result. But sometimes it is better to have an approximation than to have no data at all. Compare Fig. 1-13 with Fig. 1-6, and you can see that the linear interpolation error is considerable in this case.
Curve fitting is an intuitive scheme for approximating a point-to-point graph, or filling in a graph containing one or more gaps, to make it look like a continuous curve. Figure 1-14 is an approximate graph of the price of hypothetical Stock Y, based on points determined at intervals of half an hour, as generated by curve fitting. Here, the moment-to-moment stock price is shown by the dashed line, and the fitted curve, based on half-hour intervals, is shown by the solid line. The fitted curve does not precisely represent the actual stock price at every instant, but it comes close most of the time.
Curve fitting becomes increasingly accurate as the values are determined at more and more frequent intervals. When the values are determined infrequently, this scheme can be subject to large errors, as is shown by the example of Fig. 1-15.
The term extrapolate means ''to put outside of.'' When a function has a continuous-curve graph where time is the independent variable, extrapolation is the same thing as short-term forecasting. Two examples are shown in Fig. 1-16.
In Fig. 1-16A, the price of the hypothetical Stock X is plotted until 2:00 P.M., and then an attempt is made to forecast its price for an hour into the future, based on its past performance. In this case, linear extrapolation, the simplest form, is used. The curve is simply projected ahead as a straight line. Compare this graph with Fig. 1-6. In this case, linear extrapolation works fairly well.
Figure 1-16B shows the price of the hypothetical Stock Y plotted until 2:00 P.M., and then linear extrapolation is used in an attempt to predict its behavior for the next hour. As you can see by comparing this graph with Fig. 1-6, linear extrapolation does not work well in this scenario.
Extrapolation is best done by computers. Machines can notice subtle characteristics of functions that humans miss. Some graphs are easy to extrapolate, and others are not. In general, as a curve becomes more complicated, extrapolation becomes subject to more error. Also, as the extent (or distance) of the extrapolation increases for a given curve, the accuracy decreases.
A function is said to be nonincreasing if the value of the dependent variable never grows any larger (or more positive) as the value of the independent variable increases. If the dependent variable in a function never gets any smaller (or more negative) as the value of the independent variable increases, the function is said to be nondecreasing.
The dashed curve in Fig. 1-17 shows the behavior of a hypothetical Stock Q, whose price never rises throughout the period under consideration. This function is nonincreasing. The solid curve shows a hypothetical Stock R, whose price never falls throughout the period. This function is nondecreasing.
Sometimes the terms trending downward and trending upward are used to describe graphs. These terms are subjective; different people might interpret them differently. Everyone would agree that Stock Q in Fig. 1-17 trends downward while Stock R trends upward. But a stock that rises and falls several times during a period might be harder to define in this respect.
Specialized graphs called scatter plots or scatter graphs can show the extent of correlation between the values of two variables when the values are obtained from a finite number of experimental samples.
If, as the value of one variable generally increases, the value of the other generally increases too, the correlation is considered positive. If the opposite is true – the value of one variable generally increases as the other generally decreases – the correlation is considered negative. If the points are randomly scattered all over the graph, then the correlation is considered to be 0.
Figure 1-18 shows five examples of scatter plots. At A the correlation is 0. At B and C, the correlation is positive. At D and E, the correlation is negative. When correlation exists, the points tend to be clustered along a well-defined path. In these examples the paths are straight lines, but in some situations they can be curves. The more nearly the points in a scatter plot lie along a straight line, the stronger the correlation.
Correlation is rated on a scale from a minimum of –1, through 0, up to a maximum of +1. When all the points in a scatter plot lie along a straight line that ramps downward as you go to the right, indicating that one variable decreases uniformly as the other variable increases, the correlation is –1. When all the points lie along a straight line that ramps upward as you go to the right, indicating that one variable increases uniformly as the other variable increases, the correlation is +1. None of the graphs in Fig. 1-18 show either of these extremes. The actual value of the correlation factor for a set of points is determined according to a rather complicated formula that is beyond the scope of this book.
Tweaks, Trends, and Correlation Practice Problems
Suppose, as the value of the independent variable in a function changes, the value of the dependent variable does not change. This is called a constant function. Is its graph nonincreasing or nondecreasing?
According to our definitions, the graph of a constant function is both nonincreasing and nondecreasing. Its value never increases, and it never decreases.
Is there any type of function for which linear interpolation is perfectly accurate, that is, ''fills in the gap'' with zero error?
Yes. If the graph of a function is known to be a straight line, then linear interpolation can be used to ''fill in a gap'' and the result will be free of error. An example is the speed of a car that accelerates at a defined and constant rate. If its speed-versus-time graph appears as a perfectly straight line with a small gap, then linear interpolation can be used to determine the car's speed at points inside the gap, as shown in Fig. 1-19. In this graph, the heavy dashed line represents actual measured data, and the thinner solid line represents interpolated data.
Fig. 1-19. Illustration for Practice 2.
Practice problems for these concepts can be found at:
- Kindergarten Sight Words List
- First Grade Sight Words List
- 10 Fun Activities for Children with Autism
- Grammar Lesson: Complete and Simple Predicates
- Definitions of Social Studies
- Child Development Theories
- Signs Your Child Might Have Asperger's Syndrome
- How to Practice Preschool Letter and Name Writing
- Social Cognitive Theory
- Theories of Learning