Back
Plot Values from Discrete and Continuous Functions
> ... Math > Introduction to Graphs > Plot Values from Discrete and Continuous Functions

Introduction

In this lesson, you will learn how to plot values for a function. You will also learn the difference between discrete and continuous data and how to show each type on a graph.


These videos illustrate the lesson material below. Watching the videos is optional.


Plot Values from a Function

A function is a set of rules so that for every input, you get only one output. Functions are represented in math as equations with two variables: x and y. The x is the input and y is the output. For every x you plug into the equation, you only get one y.

You can represent functions on a graph using the coordinate plane with the coordinates being x (the input) and y (the output). The point is written like this: (x, y). The functions in this lesson create a pattern of points that make a line.

Example 1
Plot values from this function: \( y=\frac{1}{2}x\).

First, start inputting values for x and solving for y. You can substitute any value for x that makes sense, but it is often easiest to start with 1. Make a column for x values and a column for y values.

This image shows plot values for the function y = 1/2x.

Figure 1

\begin{align*} y &=\frac{1}{2} (1) &\color{red}\small\text{Substitute x =1}\\\ y &=\frac{1}{2} &\color{red}\small\text{Simplify for the value of y} \end{align*}
So, the first point is (1, \(\frac{1}{2}\)). Figure 2 shows where it is plotted:

This images shows where it values from the previous figure is plotted. (1,1/2)

Figure 2

Find another point by using 0 for x. If you plot a point where x is 0, you will discover where the function, or line, crosses the y-axis.

\begin{align*} y &=\frac{1}{2} (0) &\color{red}\small\text{Substitute x =0}\\\ y &=0 &\color{red}\small\text{Simplify for the value of y} \end{align*}

The next point is (0,0), which is the origin.

This image shows the point (0, 0), which is the origin.

Figure 3

For the next x value, use -1.

\begin{align*} y &=\frac{1}{2} (-1) &\color{red}\small\text{Substitute x =-1}\\\ y &=-\frac{1}{2} &\color{red}\small\text{Simplify for the value of y} \end{align*}

The next point \((-1, -\frac{1}{2})\). It is plotted in Figure 4.

This shows the points (-1, -1/2) plotted in the graph.

Figure 4

Now that you have plotted a few points, you can see that \( y=\frac{1}{2}x\) creates a pattern. You only need 2 points since 2 points determine a line but sometimes it is a great idea to have a third point to make sure the graph is a straight line.

This image shows that the points that are plotted creates a pattern.

Figure 5

You can check points on the line to make sure it follows the pattern. For example, looking at the line, it appears that when x is 4, y is 2:

\begin{align*} y &=\frac{1}{2} (4) &\color{red}\small\text{Substitute x =4}\\\\\ y &= 2 &\color{red}\small\text{Simplify for the value of y} \end{align*}

The point (4, 2) is correct.

Based on this equation, the line will continue off into infinity in both directions, so there are an infinite number of points on this line.

This image shows that based on the equation, the line will continue off into infinity in both directions.

Figure 6

Discrete and Continuous Data and Graphs

Sometimes you plot points that don’t make a perfect pattern or that have no values in between. This is called discrete data and you don’t connect the dots with a line.

  • Discrete data are a set of data where the points are separate and distinct. A scatter plot is an example of discrete data. It is specifically a set of data with things that cannot be measured continuously, meaning it contains whole numbers.

An example of discrete data is the number of people in a school; it must be a whole number because you don’t have a fraction of a person. Other examples of discrete data include the number of horses in a barn or the amount of inventory in a store. If the store sells books, then the number of books is discrete data because you can count the number of books as whole numbers.

Example 2
The chart below displays the number of students in a school based on the date. Graph the data.

DateNumber of Students
1-Feb55
2-Feb54
3-Feb59
4-Feb62
5-Feb53

A graph of the number of students based on the table above.

Figure 7

This data can be graphed using a scatterplot because the points are distinct. The attendance at the school is specific to the day, and there are no values between where you might have fractions of a student, so this is discrete data.

When you plot some points from a function and then connect those points with a line, you are demonstrating continuous data. If you were to choose any number between the points you plotted, the equation’s output would be on the line because of the pattern the function makes.

  • Continuous data is a set of data that can be measured continuously. Even though there may be specific points in the data, there are additional and infinite data between those points.

Temperature is an example of continuous data. If you take the temperature between Minute 1 and Minute 2 and compare them. The temperatures may be different, but the temperature didn’t jump directly from one point to the other. The temperature gradually increased (or decreased) from one temperature to another. The same is true with a car. The speed of a car gradually speeds up or slows down. It doesn’t jump from 10 miles an hour to 20 miles an hour. There’s a continuous increase in speed between the two points.

Example 3
The chart below displays the time in seconds it takes a car to reach a certain speed. Graph the data.

Time in SecondsSpeed
00
15
211
318
426
535
645
756
868
969
1070
This chart shows the time it takes a car to reach a certain speed based on the table above.

Figure 8

To graph a continuous function, use a line between the dots. On the graph, you see that the car continues to get faster and faster with each second, but in between each of these seconds there is an infinite number of other speeds corresponding to fractions of a second, which makes this continuous data. You could measure in smaller and smaller fractions of a second and still find the speed that the car was going at the time the measurement was taken.


Things to Remember


  • A function is an equation where every x input has only one y output. 
  • Discrete data is a set of data where the points are separate and distinct.
    • It is data that can be counted.
    • On a graph, points are not connected like a scatter plot graph.
  • Continuous data is a set of data that can be measured continuously.
    • It is data that can be measured.
    • On a graph, points are connected.

Practice Problems

1. Is the graph below discrete or continuous?
(Solution
x
Solution: Discrete
Details:
This shows discrete data because each point is distinct and not connected to one another.
)
This is a coordinate plane with x axis from negative eight to eight and y axis from negative six to six. The points on the coordinate plane are point (negative 6, negative 5), (negative 4, negative 4), (negative 4.5, negative 3), (negative 3, negative 2), (negative 1.5, negative 1.5), (negative 1, 0), (1, 0), (1, 1), (2, 1.5), (3, 3.5), (3.5, 2.5), (5, 4).
2. Is the graph below discrete or continuous? (
Solution
x
Solution: Continuous
Details:
This shows continuous data because all points lie on one continuous line.
)
This is a coordinate plane with x axis from negative eight to eight and y axis from negative six to six. The solid line on the coordinate plane goes through point (2, 2) and point (negative 6, negative 3).

3. A chicken breeder sells pullets (young hens that have just started laying eggs) for \($25\) each. The breeder charges an additional \($100\) to deliver the animals, regardless of the number purchased. If you let P represent the number of pullets sold, then you can represent the total cost (T) as \(T = 100 + 25P\). Create a graph that illustrates the relationship between P and T, assuming that the number of pullets purchased is between 1 and 8.

(Hint: Use the equation for the total cost. Create a table with input values from 1 to 8, and calculate the outputs to find the coordinates that you need to graph.) (
Solution
x
Solution:
This is a scatter plot with x-axis from zero to nine that represents the number of pullets and y-axis from zero to three hundred and fifty that represents the total cost in dollars. The points on the scatter plot are (1, 125), (2, 150), (3, 175), (4, 200), (5, 225), (6, 250), (7, 275), (8, 300).

The total cost of buying the pullets can be represented by the equation \(T = 100 + 25 P\), where T is the total cost and P is the number of pullets you have purchased.

If you purchase \({\color{Red}1}\) pullet, then you can find out the total cost by substituting 1 into the equation, \(T = 100 + 25 P\), for P:

\(T = 100 + 25 ({\color{Red}1})\)

Then multiply 25 by \({\color{Red}1}\) which gives you:

\(T = 100 + {\color{Red}25}\)

Then add 25 to 100:

\(T = 125\)

So the total cost for one pullet would be \($125\).

Continue the same process for purchasing 2-8 pullets.






P T How do we know the total cost?
1125T = 100 + 25P
T = 100 + 25 (1)
T = 100 + 25
T = 125
2150T = 100 + 25P
T = 100 + 25 (2)
T = 100 + 50
T = 150
3175T = 100 + 25P
T = 100 + 25 (3)
T = 100 + 75
T = 175
4200T = 100 + 25P
T = 100 + 25 (4)
T = 100 + 100
T = 200
5225T = 100 + 25P
T = 100 + 25 (5)
T = 100 + 125
T = 225
6250T = 100 + 25P
T = 100 + 25 (6)
T = 100 + 150
T = 250
7275T = 100 + 25P
T = 100 + 25 (7)
T = 100 + 175
T = 275
8300T = 100 + 25P
T = 100 + 25 (8)
T = 100 + 200
T = 300


Now you can plot each of the eight points on the graph:

This is a scatter plot with x-axis from zero to nine that represents the number of pullets and y-axis from zero to three hundred and fifty that represents the total cost in dollars. The points on the scatter plot are (1, 125), (2, 150), (3, 175), (4, 200), (5, 225), (6, 250), (7, 275), (8, 300).
)

4. Suppose that you are driving to a destination 100 kilometers away at a constant speed of R kilometers per hour (km/h). The amount of time required to reach your destination is \(\frac{100}{\text{R}}\). Choose values for R, and create a graph showing the relationship between the speed (R) and the time (T). (
Solution
x
Solution: This graph shows the time required when the speed is between 30 and 130 km/h.
This is a scatter plot with x-axis from zero to one hundred forty that represents speed and y-axis from zero to 3.5 that represents time.  The points on the scatter plot are (30, 3.3) , (40, 2.5), (50, 2), (60, 1.7), (70, 1.4), (80, 1.25), (90, 1.1), (100, 1), (110, 0.91), (120, 0.83), (130,0.76).
)

    Need More Help?


    1. Study other Math Lessons in the Resource Center.
    2. Visit the Online Tutoring Resources in the Resource Center.
    3. Contact your Instructor.
    4. If you still need help, Schedule a Tutor.