Economic Applications of Regression for the TI-84+ Silver ...



Using The TI-84+

to

Support and Explore

Economics Content

by

Wayne A. Williams

for The

TechMath Presentation on

8/3/07

by

Beth Eckstein & Wayne Williams

Economic Applications of Regression for the TI-84+ Silver Edition

-----------------------

I. Quantity v. Price

We tend to think that the quantity in demand depends on the price to be charged; the lower the price, the more people will want. So, for us, it is natural to define Q on the y-axis and P on the x-axis.

Press the STAT button on your calculator. You should see the screen at the right.

Choose Edit by pressing 1. You should see this.

Enter Q in list 1 and P in list 2. The values are below.

|Q |P |

|0 |6 |

|1 |5 |

|2 |4 |

|3 |3 |

|4 |2 |

|5 |1 |

You’ll see this when you’re done.

To get the graph, you’ll have to turn a plot on. Press 2nd and Y= to do so, and you’ll see this. Select 1, and set your graph up to match the last picture.

[pic]

[pic]

[pic]

[pic]

[pic]

By pressing Zoom 9, you should see this.

We can either derive this equation by hand, or we can let the calculator find the regression equation. We’ll do the latter.

Press Stat. Arrow once to the right, selecting Calc. Your screen should look like this.

Since our data is obviously linear, we’ll choose 4: LinReg (ax+b).

2nd

1

comma

2nd

2

comma

Vars

arrow to Y-vars

Function

Y1

You should see this.

Press Enter. If your diagnostics are on, you’ll get r2 and r. If you don’t see these, don’t worry about it. I can tell you how to get them later if you like.

When you press Graph, you’ll see this.

[pic]

[pic]

[pic]

[pic]

[pic]

II. Quantity vs. Revenue

This example continues with the same numbers that we’ve been working with from the beginning of this worksheet. In class, and at the end of this packet, we will explore a different number set, using larger and more realistic numbers.

This line suggests, as we might expect, that as price increases, the quantity in demand decreases. This is called the demand curve.

Beth talked about total revenue. Total revenue is the product of units sold multiplied by price per unit.

For us, that is L1*L2. This can be entered in the calculator’s third list as shown at right. Please note the position of the cursor on the name of the third list.

When you press Enter, you should see this.

The new graph looks like this. To see it, turn off plot 1 and Y1, turn on plot 2, and set plot 2 up to display L1 vs L3.

As we discussed with Beth, this is quadratic. (Why is this?) You have the equation for the line that describes L2. L1 represents x. We got L3 by multiplying L1 and L2. So if we multiply our equation in Y1 times x, we should get a good fit for this graph. The next two screen shots display this.

Just as we used LinReg to find the line of best fit for Q and P, as given on the first page, we can use Stat Calc 5:QuadReg to arrive at the same equation. A screen shot of this setup is provided. Compare your equations in Y2 and Y3.

We’ve just created a total revenue graph.

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

III. Marginal Revenue

Marginal Revenue is defined as the amount of change in revenue attained by selling the next item. Fortunately, our calculator handles that nicely for us.

Go to Stat, and highlight L4. Then press the following:

2nd

Stat

Right arrow to OPS

7: [pic]List(

Enter

2nd

3

You should see this…

And when you hit Enter, this;

L4 tells us the change in L3. In other words, this is the change in total revenue, or the marginal revenue.

If we try to graph this new column against L1, the calculator will give us the following:

(Unclear/ handwaving)

L1 is one term longer than L4. The dimensions of the lists don’t match. Hence the error. We could make them match by making L5 the average of the consecutive terms in L1. Then plot L5 as the X-list and L4 as the Y-list. You should see this. (also clarify what lists are being graphed.)

[pic]

[pic]

[pic]

[pic]

Plotting the previous graph on the same set of axes as the total revenue graph is telling – I’ve got Plot 1 showing the marginal revenue, and I’ll set up Plot 2 to show total revenue. They are graphed simultaneously at right. I did change Plot 1 to use the “+” symbol for the points to distinguish between the plots.

As practice, try a linear regression on plot 2. You’ve gotten it when you can draw this:

(Hint: send this graph to Y3.)

Special Treat for the Calculus Folks…

Consider what we just found. We graphed the change in the total revenue vs. the change in the quantity. In other words, we graphed the slope of the revenue curve at 5 points, i.e., we effectively just graphed the derivative of the total revenue graph.

To convince yourself, try this.

In Y4, press the following:

Math

8: nDeriv(

Vars

right arrow to Y-vars

1 (Function)

2 (Y2)

comma

x

comma

x

)

In terms of calculator syntax, what you just told the calculator was to take the derivative of Y2, in terms of x, for every point x, and graph that derivative in Y4.

If you turn off Y3, you’ll notice that your graph of the derivative exactly fits the data points.

[pic]

[pic]

[pic]

[pic]

Total Revenue and Marginal Revenue from the presentation:

|Q = L1 |P = L2 |TR = Q*P = L3 |

|0 |10 |0 |

|10 |9 |90 |

|20 |8 |160 |

|30 |7 |210 |

|40 |6 |240 |

|50 |5 |250 |

|60 |4 |240 |

|70 |3 |210 |

|80 |2 |160 |

|90 |1 |90 |

|100 |0 |0 |

Construct the table above in your lists, L1, L2, and L3.

If you want to avoid having to type all of the above, you can also use the following commands.

Highlight L1.

Press the following:

2nd

Stat

Right Arrow (to OPS)

5

You should see this.

The syntax will say

seq(x,x,0,100,10)

It means the following:

The first x tells the calculator the function to use to create the list. It doesn’t have to be x, but making it so can prevent some confusion. The 2nd x tells the calculator the variable the previous expression is intended to be in terms of. The next number (0 in the example above) tells the calculator the number to start on. The next number (100) tells the calculator where to stop. The final number (10) tells the calculator the size of the step to use to get from the first number to the last. When finished, look for this.

[pic]

[pic]

[pic]

Repeat this for L2. If you need it, the syntax is given below. Refer to previous pages for the steps of any commands you’ve forgotten how to execute. L3 is a product of L1 and L 2.

L2 = seq(x,x,10,0,-1)

L3 = L1*L2

At this point, your screen should look like this.

Notice the relative sizes of the data in lists L2 and L3. If we set up plot 1 and plot 2 to graph each of these lists, respectively, against L1, the screen looks like this.

Notice that the linear data set is almost completely obscured by the x-axis. We can help some of this by exploring the Window settings.

Press the Window key, located directly under the screen. You’ll see this:

The x-scale of 1 means that the calculator is drawing 120 (110 - -10) tick marks on the x-axis. This is why it appears so thick and obscures the line. The y scale is currently drawing 335 tick marks up the side.

The formula I have my students use for manually setting the scale is

[pic]

Applying this to the above, we would set our window as follows…

[pic]

[pic]

[pic]

[pic]

…which would make our graph look like this:

Again, to fit a quadratic to this, the keystrokes are:

Stat

arrow to Calc

5: QuadReg

2nd

1

2nd

3

Vars

arrow to Y-Vars

1: Function

1:Y1

Enter

At which point you should see this:

Which draws this graph:

If we want to consider marginal revenue, we’ll need the average values of successive terms in L1 stored to L4 and the change in L3 stored in L5. The directions for how to do these are on page 6 of this handout, if you’d like to refer to them.

We’ll replace Plot 1 with these newly created lists…

…making our graph look like this.

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

We have just created a graph of total revenue (the parabola) and below it, a graph of the marginal revenue (the line). Notice that where the total revenue is at its maximum, the marginal revenue function has a zero. We can verify this.

On our graph, we need to include the line representing the marginal revenue. Instructions for doing this can be found on page 4.

The graph should look like this.

To find the maximum of the revenue function from its graph, press the following:

2nd

Trace

4: maximum

Now, use your left arrow key to move the cursor to a point left of where you think the maximum is, and press enter. Then set the right bound with the right arrow, pressing enter when you have gotten far enough to the right. Finally, press enter one more time when it asks you to make a guess.

(You may want your students to move the cursor to their nearest guess before pressing that final enter.)

When you finish the above steps, you should see this:

We’ll interpret the abscissa (independent value) (x-value) to be 50.

This time, we’ll find the zero of the marginal revenue. Press the following:

2nd

Trace

2: Zero

Up Arrow until the upper left of the screen displays Y2.

The bounding procedure is essentially the same as above. Go left of the zero and hit enter, go right and hit enter, arrow to your best guess if you like, and hit enter one more time. Notice the abscissa (independent value).

[pic]

[pic]

[pic]

Fitting a Line

to Your

Data

Entering

Your

Data

Viewing

Your

Data

Fitting

Quadratics

Calculating the

Change in

a List

Common

Error:

Dim Mismatch

Marginal

Revenue as the

Derivative

of

Total Revenue

(Needs transition)

Using Sequences

to

populate a

list

Window

Scaling

Window Scaling

continued

Locating

Maximum

Total Revenue

by

Trace: Maximum

Locating

Maximum

Total Revenue

by

Finding the

Zero of the

Marginal

Revenue

Function

Showing Total profit as a difference

between

total revenue

and

total cost

IV. Total Profit

In our presentation, Beth discussed total cost and marginal cost. Given the data, creating and analyzing these graphs is not significantly different from creating and analyzing the graphs for total and marginal revenue. However, total profit gives us an opportunity to address one more calculator skill we have not used – operating with equations from the Y= list within the Y= list.

Press Y=.

Enter equations so that your screen matches the following:

On this screen, Y1 represents the total revenue function, and Y2 represents the total cost function.

Also, please set your window to match the following:

Your graph should look like this.

Total profit is found by subtracting total costs from total revenues. In Y3, create Y1 - Y2 by pressing the following:

Y=

Vars

arrow to Y-Vars

1 (Function)

1 (Y1)

-

Vars

arrow to Y-Vars

1 (Function)

2 (Y2)

You should see this.

[pic]

[pic]

[pic]

[pic]

Graphing

derivatives with

nDeriv

Adjusting the

Window

Zoom In

We won’t want to show all of these equations at once, but we can’t delete them. Place your cursor on the equals sign beside Y1. Press Enter. By unhighlighting the = symbol, Y1 is retained in memory, but not graphed.

Repeat for Y1 and Y2. It should look like this when you’re done.

The graph will look like this now. Remember, it will draw much more slowly.

Notice how all three lines are compressed very tightly into the bottom of the screen. We’ll need to change the window to make this view more useful.

Notice also that the highest line is not over the 1st tick mark on the y-axis. We’ll use this to decide on our y-max.

Here’s our current window.

According to the Yscl, each tick mark on the y axis represents 30. (30 whats?) So, if our line doesn’t go higher than 1 of these, our new Ymax can be 30. I’ll leave one tick mark below the Y axis, so our Ymin will remain at -30. Using the formula on page 9 for scaling, the new scale should be 6.

At right are screenshots of the window, and the graph it produces.

Our next task will be to zoom in. That is located under, amazingly enough, the menu display we get by pressing Zoom.

We’ll select option 2, Zoom In

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

The graph now looks like this.

The upper downward facing parabola is Y1,(TR) the lower downward facing parabola abola is Y3, (π is used in economics to represent total profit) and the parabola curving upward is Y2 (TC).

The marginal revenue is the derivative of Y1, the marginal cost is the derivative of Y2, and the marginal profit is the derivative of Y3.

To get these, we’ll use the use the calculator’s numerical derivative calculator (nDeriv) This function of the calculator takes the derivative of a curve with respect to a particular variable at any point you name. What we’ll do is direct the calculator to take the derivative at all points x. This will make the calculator graph much more slowly than normal, as the computation it is performing to produce each necessary y-value is much more complex.

The steps are as follows:

Begin by highlighting Y4

Math

8: nDeriv(

Vars

arrow to Y-Vars

1 (Function)

1 (Y1)

comma

x

comma

x

)

You should see this:

Repeat for Y5 and Y6, until your screen show this:

Calculating Numerical

Derivatives

Zoom In C

ontinued

Using Intersect

Pressing 2, we see this. If your cursor isn’t in the same place as mine, move it until the coordinates are as close as possible.

When you have them there, press Enter. You should see this, or something very like it.

It so happens that the marginal cost and the marginal revenue are equal at the point that maximizes profit. The marginal profit is zero at this point. We’ll use the calculator to verify these.

To find the place where marginal revenue and marginal cost are equal, we’ll use the intersect function. Press the following.

2nd

Trace

5: Intersect

In the upper left corner of your screen, watch the functions that are being displayed. Because these are lines, we don’t actually have to trace to the point of intersection; there is only one. Press Enter while Y4 is displayed, and again while Y5 is displayed. Press it one more time, and you should see this.

On page 11, we used the zero function. Use it again here to find the zero of Y6. You should see this.

Hmmmmmmmm… (Think Church Lady from

SNL)

[pic]

[pic]

[pic]

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download