Functions and Linear Models
Functions and Linear Models
Functions and
Linear Models
Sections 1.3 and 1.4
Linear Function
A linear function can be expressed in the form
f ( x) mx b
Function notation
y mx b
Equation notation
y f ( x) mx b
m is called the slope of the line and
b is the y-intercept of the line.
Arbitrary point
(1,2)
(0,-1)
y-intercept
x-axis
f ( x) mx b
f ( x 1) m( x 1) b
f ( x 1) f ( x) m( x 1) b (mx b)
f ( x 1) f ( x) mx m b mx b
f ( x 1) f ( x) m
(1,2)
Slope = 3/1
x-axis
y-intercept
x-intercept
(y = 0)
x-axis
y-intercept
(x = 0)
Delta Notation
If a quantity q changes from q1 to q2 , the change
in q is denoted by q and it is computed as
q q2 q1
Example: If x is changed from 2 to 5, we write
x x2 x1 5 2 3
Delta Notation
Example: the slope of a non-vertical line that
passes through the points (x1 , y1) and (x2 , y2) is
given by:
y y2 y1
m
x x2 x1
y 3 0 3
3
m
x 6 4 2
2
Delta Notation
This is a horizontal
line
x 4 4 0
Undefined
This is a vertical
line
Examples
Estimate the slope of all line segments in the
figure
y y1 m x x1
Example: Find an equation of the line that passes
through (3,1) and has slope m = 4
y y1 m x x1
y 1 4 x 3
y 4 x 11
Horizontal Lines
Can be expressed in the form y = b
y=2
Vertical Lines
Can be expressed in the form x = a
x=3
Linear Models:
Applications of linear
Functions
First,
General Definitions
Cost Function
A cost function specifies the cost C as a
function of the number of items x produced.
Thus, C(x) is the cost of x items.
The cost functions is made up of two parts:
C(x)= variable costs + fixed costs
Cost Function
If the graph of a cost function is a straight
line, then we have a Linear Cost Function.
If the graph is not a straight line, then we
have a Nonlinear Cost Function.
Dollars
Cost
Units
Cost
Units
Cost
Units
Dollars
Cost
Units
Revenue Function
The revenue function specifies the total payment
received R from selling x items. Thus, R(x) is the
revenue from selling x items.
A revenue function may be Linear or Nonlinear
depending on the expression that defines it.
Revenue
Units
Revenue
Units
Dollars
Revenue
Units
Profit Function
The profit function specifies the net proceeds P.
P represents what remains of the revenue when
costs are subtracted. Thus, P(x) is the profit from
selling x items.
Profit = Revenue Cost
Units
Dollars
Profit
Units
Profit
Units
C ( x) mx b
Revenue Function:
R( x) mx
Profit Function: P ( x) R ( x) C ( x)
where x = number of items (produced and
sold)
Break-Even Analysis
The break-even point is the level of production that
results in no profit and no loss.
To find the break-even point we set the profit function
equal to zero and solve for x.
P( x) 0
R( x) C ( x) 0
Break-Even Analysis
The break-even point is the level of production that
results in no profit and no loss.
Profit = 0
Dollars
means
Revenue = Cost
Revenue
profit
Break-even
Revenue
loss
Cost
Units
Break-even point
b.
c.
12 x 3 x 3600
x 400
7000
C, R, P in $
C(x)
6000
5000
4000
3000
2000
1000
-200
-1000
-2000
-3000
-4000
x
200
400
600
800
7000
C, R, P in $
R(x)
C(x)
6000
5000
4000
3000
2000
1000
-200
-1000
-2000
-3000
-4000
x
200
400
600
800
7000
C, R, P in $
R(x)
C(x)
6000
5000
P(x)
4000
3000
2000
1000
-200
-1000
-2000
-3000
-4000
x
200
400
600
800
Demand Function
A demand function or demand equation expresses
the number q of items demanded as a function of
the unit price p (the price per item).
Thus, q(p) is the number of items demanded when
the price of each item is p.
As in the previous cases we have linear and
nonlinear demand functions.
Price p
q = items
demanded
Price p
Price p
Supply Function
A supply function or supply equation expresses
the number q of items, a supplier is willing to
make available, as a function of the unit price p
(the price per item).
Thus, q(p) is the number of items supplied when
the price of each item is p.
As in the previous cases we have linear and
nonlinear supply functions.
Price p
q = items
supplied
Price p
Price p
Market Equilibrium
Market Equilibrium occurs when the quantity produced
is equal to the quantity demanded.
supply
curve
q
shortage
surplus
demand
curve
p
Equilibrium Point
Market Equilibrium
Market Equilibrium occurs when the quantity produced
is equal to the quantity demanded.
q
supply curve
surplus
shortage
Equilibrium
demand
demand curve
p
Equilibrium price
Market Equilibrium
To find the Equilibrium price set the demand
equation equal to the supply equation and solve
for the price p.
To find the Equilibrium demand evaluate the
demand (or supply) function at the equilibrium
price found in the previous step.
q q2 q1 34 50 16
m
4
p p2 p1 10 6
4
q 50 4( p 6)
q 4 p 74
p1 , q1 3, 4
q
94
m
10
p 2.5 3
and p2 , q2 2.5,9 ;
q 4 10 p 3
q 10 p 34
p1 , q1 1, 0
and p2 , q2 1.3, 2 ;
q 2 0 20
m
p 1.3 1 3
20
20
q
p
3
3
Demand Supply
10 p 34 (1/ 3)(20 p 20)
30 p 102 20 p 20
p 2.44
q 10(2.44) 34 9.6
The equilibrium demand is 960 units at a price of
$2.44 per unit.
q (t ) mt b
Rate of
change of q
Quantity at
time t = 0
Linear Regression
We have seen how to find a linear model given
two data points. We find the equation of the line
passing through them.
However, we usually have more than two data
points, and they will rarely all lie on a single
straight line, but may often come close to doing
so.
The problem is to find the line coming closest to
passing through all of the points.
Linear Regression
We use the method of least squares to determine a
straight line that best fits a set of data points when
the points are scattered about a straight line.
least squares
line
and
n xy x y
n
x x
2
y m x
b
n
Sum:
m
b
x
1
2
3
y
2
3
7
xy
2
6
21
x2
1
4
9
12
29
14
3 29 6 12
3 14 6
12 2.5 6
3
2.5
y 2.5 x 1
y 2.5 x 1
Coefficient of Correlation
A measurement of the closeness of fit of the least
squares line. Denoted r, it is between 1 and 1, the
better the fit, the closer it is to 1 or 1.
n xy x y
r
n
x x
2
y y
2
n xy x y
r
n
(1 , 2), (2 , 3), (3 , 7)
x x
2
y y
2
3 29 6 12
3 14 6 3 62 12
= 0.9449