Trident Help

Classic Graphing 84 manual · Chapter 14 of 25

Regression: fitting curves to data

Fit lines, polynomials, exponentials, powers, logarithms, logistic and sine curves to data, store the equation in Y= and read r and R².

14.1The regression commands#

Regression finds the curve of a chosen type that fits the data best. All the commands are in STAT, CALC. They need an Xlist and a Ylist of equal length (L1 and L2 by default), an optional frequency list and an optional place to store the equation.

The CALC tab of the STAT menu. The display shows: EDIT [CALC] TESTS / 1:1-Var Stats / 2:2-Var Stats / 3:Med-Med / 4:LinReg(ax+b) / 5:QuadReg / 6:CubicReg / 7↓QuartReg.
The CALC tab of the STAT menu.
ItemCommandFits
3Med-Medy=ax+by=ax+b through medians (resists outliers)
4LinReg(ax+b)y=ax+by=ax+b
5QuadRegy=ax2+bx+cy=ax^2+bx+c
6CubicRegy=ax3+bx2+cx+dy=ax^3+bx^2+cx+d
7QuartRegy=ax4+bx3+cx2+dx+ey=ax^4+bx^3+cx^2+dx+e
8LinReg(a+bx)y=a+bxy=a+bx
9LnRegy=a+bln⁡xy=a+b\ln x
0ExpRegy=a bxy=a\,b^{x}
APwrRegy=a xby=a\,x^{b}
BLogisticy=c1+a e−bxy=\dfrac{c}{1+a\,e^{-bx}}
CSinRegy=asin⁡(bx+c)+dy=a\sin(bx+c)+d

14.2Fit a straight line#

a=n∑xy−∑x∑yn∑x2−(∑x)2,b=yˉ−axˉa=\frac{n\sum xy-\sum x\sum y}{n\sum x^2-(\sum x)^2},\qquad b=\bar{y}-a\bar{x}
Least-squares slope and intercept.
The LinReg(ax+b) form: lists, frequency and where to store the equation. The display shows: LinReg(ax+b) / Xlist:L1 / Ylist:L2 / FreqList: / Store RegEQ: / Calculate.
The LinReg(ax+b) form: lists, frequency and where to store the equation.
Example 14.1

A line through exact data

y=2x+1y=2x+1
  1. L1 = 1, 2, 3, 4 and L2 = 3, 5, 7, 9.

    stat11enter2enter3enter4enter▶3enter5enter7enter9enter
  2. Open STAT, CALC, 4 (LinReg(ax+b)), move down four times to Calculate and press enter.

    stat▶4▼▼▼▼enter
Result of the example "A line through exact data" The display shows: LinReg / y=ax+b / a=2 / b=1 / r²=1 / r=1.
You should seey=ax+b a=2 b=1 r²=1 r=1
Example 14.2

A line through scattered data

  1. L1 = 1 to 5, L2 = 2, 4, 5, 4, 5.

    stat11enter2enter3enter4enter5enter▶2enter4enter5enter4enter5enter
  2. Run LinReg(ax+b).

    stat▶4▼▼▼▼enter
Result of the example "A line through scattered data" The display shows: LinReg / y=ax+b / a=.6 / b=2.2 / r²=.6 / r=.7745966692.
You should seea=.6 b=2.2 r²=.6 r=.7745966692

r is the correlation coefficient: close to 1 or −1 means a strong straight-line pattern, close to 0 means none. r² is the share of the variation the line explains. These lines appear when STAT DIAGNOSTICS is ON in MODE.

Example 14.3

The other form y = a + bx

  1. Use the same L1 and L2 as above (exact data), and choose item 8.

    stat11enter2enter3enter4enter▶3enter5enter7enter9enterstat▶8▼▼▼▼enter
Result of the example "The other form y = a + bx" The display shows: LinReg / y=a+bx / a=1 / b=2 / r²=1 / r=1.
You should seey=a+bx a=1 b=2
Example 14.4

A resistant line (Med-Med)

  1. L1 = 1 to 6, L2 = 2, 4, 6, 8, 10, 12, then item 3.

    stat11enter2enter3enter4enter5enter6enter▶2enter4enter6enter8enter10enter12enterstat▶3▼▼▼▼enter
Result of the example "A resistant line (Med-Med)" The display shows: Med-Med / y=ax+b / a=2 / b=0.
You should seey=ax+b a=2 b=0

14.3Store the regression equation in Y=#

The Store RegEQ field puts the equation into a Y= slot so you can graph it. Move down to that field, press vars, ▶, 1, 1 to paste Y1, then move down and run the command. Even without storing, the last equation is available as RegEQ in vars, 5 (Statistics…), EQ tab.

Example 14.5

Put the line into Y1

  1. Enter the data L1 = 1…4 and L2 = 3, 5, 7, 9. Open LinReg(ax+b) and move down to Store RegEQ.

    stat11enter2enter3enter4enter▶3enter5enter7enter9enterstat▶4▼▼▼
  2. Paste Y1 with vars, right, 1, 1, then down and enter to calculate.

    vars▶11▼enter
  3. Open Y=.

    y=
Result of the example "Put the line into Y1" The display shows: Plot1 Plot2 Plot3 / ■Y1=2X+1 / ■Y2= / ■Y3= / ■Y4= / ■Y5= / ■Y6= / ■Y7=.
You should see■Y1=2X+1
Example 14.6

Predict with RegEQ

  1. Run LinReg(ax+b) on the same data and leave with clear.

    stat11enter2enter3enter4enter▶3enter5enter7enter9enterstat▶4▼▼▼▼enterclear
  2. Store 10 in X. Press vars, 5, right, right, 1 (RegEQ) and enter.

    10sto→X,T,θ,nentervars5▶▶1enter
Result of the example "Predict with RegEQ" The display shows: b=1 / r²=1 / r=1 / 10→X / 10 / RegEQ / 21.
You should see21

14.4Fit a parabola, cubic, exponential, power or logarithm#

QuadReg results. The display shows: QuadReg / y=ax²+bx+c / a=1 / b=0 / c=1 / R²=1.
QuadReg results.
Example 14.7

Quadratic regression

y=x2+1y=x^2+1
  1. L1 = 0, 1, 2, 3 and L2 = 1, 2, 5, 10, then CALC item 5.

    stat10enter1enter2enter3enter▶1enter2enter5enter10enterstat▶5▼▼▼▼enter
Result of the example "Quadratic regression" The display shows: QuadReg / y=ax²+bx+c / a=1 / b=0 / c=1 / R²=1.
You should seey=ax²+bx+c a=1 b=0 c=1 R²=1
Example 14.8

Cubic regression

y=x3y=x^3
  1. L1 = 0 to 4 and L2 = 0, 1, 8, 27, 64, then item 6.

    stat10enter1enter2enter3enter4enter▶0enter1enter8enter27enter64enterstat▶6▼▼▼▼enter
Result of the example "Cubic regression" The display shows: CubicReg / y=ax³+bx²+cx+d / a=1 / b=0 / c=0 / d=0 / R²=1.
You should seea=1 b=0 c=0 d=0
Example 14.9

Exponential regression

y=3⋅2xy=3\cdot2^{x}
  1. L1 = 0 to 3 and L2 = 3, 6, 12, 24, then item 0.

    stat10enter1enter2enter3enter▶3enter6enter12enter24enterstat▶0▼▼▼▼enter
Result of the example "Exponential regression" The display shows: ExpReg / y=a*b^x / a=3 / b=2 / r²=1 / r=1.
You should seey=a*b^x a=3 b=2
Example 14.10

Power regression

y=2x2y=2x^{2}
  1. L1 = 1 to 4 and L2 = 2, 8, 18, 32, then alpha math (item A).

    stat11enter2enter3enter4enter▶2enter8enter18enter32enterstat▶alphaAmath▼▼▼▼enter
Result of the example "Power regression" The display shows: PwrReg / y=a*x^b / a=2 / b=2 / r²=1 / r=1.
You should seey=a*x^b a=2 b=2
Example 14.11

Logarithmic regression

y=1+2.885ln⁡xy=1+2.885\ln x
  1. L1 = 1, 2, 4, 8 and L2 = 1, 3, 5, 7, then item 9.

    stat11enter2enter4enter8enter▶1enter3enter5enter7enterstat▶9▼▼▼▼enter
Result of the example "Logarithmic regression" The display shows: LnReg / y=a+blnx / a=1 / b=2.885390082 / r²=1 / r=1.
You should seey=a+blnx a=1 b=2.885390082
Example 14.12

Lists of unequal length

  1. L1 has three values but L2 only two. The regression refuses.

    stat11enter2enter3enter▶1enter2enterstat▶4▼▼▼▼enter
Result of the example "Lists of unequal length" The display shows: ERR:DIM MISMATCH / 1:Quit / 2:Goto.
You should seeERR:DIM MISMATCH

TI-84 Plus CE is a trademark of Texas Instruments Incorporated. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by Texas Instruments. The name is used only to describe the kind of calculator this model resembles; Trident's names, keys, display, fonts and software are its own clean-room design.