1 Functions and Linear Models Chapter 1 Functions: Numerical, Algebraic and Graphical Linear...
-
Upload
prosper-preston -
Category
Documents
-
view
253 -
download
7
Transcript of 1 Functions and Linear Models Chapter 1 Functions: Numerical, Algebraic and Graphical Linear...
1
Functions and Linear ModelsChapter1
• Functions: Numerical, Algebraic and Graphical
• Linear Functions
• Linear Models
• Linear Regression
Lecture 1
2
Functions
A real-valued function f assigns to each real number x in a specified set of numbers (the domain of f ), a unique real number f (x), read “f of x.”
* The natural domain of f is the largest set of numbers for which f makes sense.
NOTE: It is not f times x
3
Numerically Specified Function
Ex.
tt 00 11 22 33 44
VV((tt)) 2.22.2 3.553.55 4.94.9 6.256.25 7.67.6
The data represents the velocity of an object V, in feet/sec, after t seconds have elapsed.
* Note: at 2 seconds the object is going 4.9 ft/sec.
Given numerical values for the function evaluated at certain values of the independent variable.
4
Algebraically Defined FunctionAlgebraically Defined Function
2( ) 3 2f x x is a function.
( )f x h
Ex.
2(5) 3(5) 2 77f
23 2x h
2 23 6 3 2x xh h
A function represented by a formula.
5
Mathematical ModelingRepresenting a situation in mathematical terms.
Ex. The monthly payment, M, necessary to repay a home loan of P dollars, at a rate of r % per year (compounded monthly), for t years, can be found using
12
12
112 12
1 112
t
t
r rP
Mr
6
Common Types of Algebraic Functions
Linear
Quadratic
Polynomial
( )f x mx b
2( )f x ax bx c
11 0( ) ...n n
n nf x a x a x a
(a, b, m, and each ai constant)
(a not 0)
(an not 0)
7
Common Types of Algebraic Functions
Exponential (A, b constant, b >0)
Rational (P, Q polynomials)
( ) xf x Ab
( )( )
( )
P xf x
Q x
8
Piecewise Function
Several formulas to define a single function.
Ex. 2
32 5.5 if 2( )
13.8 2.5 if 2
x xf x
x x
(1) 32 5.5(1)f 2(3) 13.8 2.5(4)f
= 26.5
= 53.8
Use when x values are less than or equal to 2
Use when x values are greater than 2
Notice
9
Graphically Specified FunctionGraphically Specified FunctionThe graph of a function is the set of all points (x, f (x)) such that x is in the domain of f .
Given the graph of y = f (x), find f (1).
f (1) = 2(1, 2)
10
Graph of a FunctionGraph of a FunctionVertical Line Test: The graph of a function can be crossed at most once by any vertical line.
Function Not a Function
It is crossed more than once.
11
Sketching a Piecewise Function
2
2 if 2 1( )
+1 if 1 2
x xf x
x x
Sketch the portion of the formula on its domain
12
Linear FunctionLinear Function
A linear function can be expressed in the form
( )f x mx b
where m and b are fixed numbers.
y mx b Equation notation
Function notation
13
Role of m and b in the Linear Function f (x) = mx + b.
The Role of m (slope)
f changes m units for each one-unit change in x.
The Role of b (y-intercept)
When x = 0, f (0) = b
14
The graph of a Linear Function: The graph of a Linear Function: Slope and Slope and yy-Intercept-Intercept
y-axis
x-axis
(1,2)
Ex. Sketch f (x) = 3x – 1
y-intercept
Slope = 3/1
15
Graphing a Line Using InterceptsGraphing a Line Using Intercepts
y-axis
x-axis
Ex. Sketch 2y + 3x = 6
y-intercept (x = 0)
x-intercept (y = 0)
16
SlopeSlope – – the slope of a non-vertical line the slope of a non-vertical line that passes through the points that passes through the points
is given by: is given by:
2 2,x y and 1 1,x y
2 1
2 1
y yym
x x x
Ex. Find the slope of the line that passes through the points (4,0) and (6, -3) 3 0 3 3
6 4 2 2
ym
x
17
Zero Slope; Undefined SlopeEx. Find the slope of the line that passes through the points (4,5) and (2, 5).
Ex. Find the slope of the line that passes through the points (4,1) and (4, 3).
5 5 00
2 4 2
ym
x
3 1 2
4 4 0
ym
x
UndefinedThis is a vertical line
This is a horizontal line
18
Point-Slope FormPoint-Slope Form
1 1
1 4 3
4 11
y y m x x
y x
y x
An equation of a line that passes through the point with slope m is given by:
1 1,x y
Ex. Find an equation of the line that passes through (3,1) and has slope m = 4
1 1y y m x x
19
**Two lines are parallel if and only if their slopes are equal or both undefined
Ex. Find an equation of the line that passes through (3,5) and is parallel to the line
21.
3y x
So m = 2/3 and we have the point (3, 5):
25 3
3y x
23
3y x
20
Horizontal LinesHorizontal Lines
y = 2
Can be expressed in the form y = b
21
Vertical LinesVertical Lines
x = 3
Can be expressed in the form x = a
22
Linear Models
Cost Function: ( )C x mx b
x = number of items
** m is the marginal cost (cost per item), b is fixed cost.
Revenue Function: ( )R x mx** m is the marginal revenue.
Profit Function: ( ) ( ) ( )P x R x C x
23
Break-Even AnalysisBreak-Even AnalysisThe break-even level of operation is the level of production that results in no profit and no loss.
Profit = Revenue – Cost = 0
Revenue = Cost
Dollars
Units
loss
Revenue
Cost
profit
Break-even point
24
Cost, Revenue, and Profit FunctionsCost, Revenue, and Profit FunctionsEx. A shirt producer has a fixed monthly cost of $3600. If each shirt has a cost of $3 and sells for $12 find:
a. The cost function
b. The revenue function
c. The profit from 900 shirts
Cost: C(x) = 3x + 3600 where x is the number of shirts produced.
Revenue: R(x) = 12x where x is the number of shirts sold.
Profit: P(x) = Revenue – Cost
= 12x – (3x + 3600) = 9x – 3600
P(900) = 9(900) – 3600 = $4500
25
Cost: C(x) = 3x + 3600
Ex. A shirt producer has a fixed monthly cost of $3600. If each shirt has a cost of $3 and sells for $12 find the break-even point.
If x is the number of shirts produced and sold
Revenue: R(x) = 12x( ) ( )
12 3 3600
400
R x C x
x x
x
(400) 4800R
At 400 units the break-even revenue is $4800
26
Linear DemandEx. The quantity demanded of a particular game is 5000 games when the unit price is $6. At $10 per unit the quantity demanded drops to 3400 games. Find a demand equation relating the price p, and the quantity demanded, q (in units of 100).
( , ) : (6,50) and (10, 34)p q
34 50 164
10 6 4m
4 74q p 50 4( 6)q p
27
Market EquilibriumMarket EquilibriumMarket Equilibrium occurs when the quantity produced is equal to the quantity demanded.
q
p
supply curve
demand curve
Equilibrium Point
shortagesurplus
28
Ex. The maker of a plastic container has determined that the demand for its product is 400 units if the unit price is $3 and 900 units if the unit price is $2.50. The manufacturer will not supply any containers for less than $1 but for each $0.30 increase in unit price above the $1, the manufacturer will market an additional 200 units. Both the supply and demand functions are linear. Let p be the price in dollars, q be in units of 100 and find:
a. The demand function
b. The supply function
c. The equilibrium price and quantity
29
a. The demand function
, : 3, 4 and 2.5,9 ;p q9 4
102.5 3
m
4 10 3q p
10 34q p
b. The supply function
, : 1,0 and 1.3,2 ;p q2 0 20
1.3 1 3m
20 20
3 3q p
30
c. The equilibrium price and quantity
Solve 10 34q p 20 20
3 3q p and
simultaneously.
10 34 (1/ 3)(20 20)p p 30 102 20 20
2.44
p p
p
The equilibrium quantity is 960 units at a price of $2.44 per unit.
10(2.44) 34 9.6q
31
Linear Change over TimeA quantity q, as a linear function of time t:
( )q t mt b
Rate of change of q
Quantity at time t = 0
*If q represents the position of a moving object, then the rate of change is velocity.
32
Linear RegressionLinear RegressionThe method of least squares is 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
33
The Method of Least SquaresThe Method of Least Squares
22
n xy x ym
n x x
y m xb
n
Given the following n data points:
The least-squares (regression) line for the data is given by y = mx + b, where m and b satisfy:
and
1 1 2 2( , ), ( , ),..., ( , )n nx y x y x y
34
Ex. Find the equation of least-squares for the data (1, 2) (2,3) (3,7)
= 2.5
2.5 1y x
2
3 29 6 12
3 14 6m
12 2.5 6
3b
xx yy xyxy xx22
11 22 22 11
22 33 66 44
33 77 2121 99
Sum: 6 12 29 14
= –1
35
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.
2 22 2
n xy x yr
n x x n y y
36
Ex. Find the correlation coefficient for the least-squares line from the last example.
(1, 2) (2,3) (3,7)Points:
2 22 2
n xy x yr
n x x n y y
2 2
3 29 6 12
3 14 6 3 62 12
= 0.9449