- WELCOME TO THE FIRST EXAMPLE OF EXPONENTIAL REGRESSION.
THE GOALS OF THE VIDEO ARE TO PERFORM EXPONENTIAL REGRESSION
ON THE TI84 GRAPHING CALCULATOR,
DETERMINE HOW WELL THE REGRESSION MODEL FITS THE DATA,
AND THEN ALSO TO MAKE PREDICTIONS
USING THE REGRESSION EQUATION.
LET'S START WITH A QUICK REVIEW OF EXPONENTIAL FUNCTIONS.
A FUNCTION IN THE FORM OF F OF X = A x B RAISED TO THE POWER OF X
IS AN EXPONENTIAL FUNCTION, WHERE X CAN BE ANY REAL NUMBER,
"A" WOULD BE THE INITIAL AMOUNT WHEN X = 0,
AND B HAS TO BE > 0 AND NOT EQUAL TO 1.
IF B IS > 1, F OF X IS A POSITIVE,
INCREASING, CONTINUOUS FUNCTION,
WHICH WOULD BE EXPONENTIAL GROWTH,
AS WE SEE HERE FROM THESE THREE FUNCTIONS.
AND IF B IS BETWEEN 0 AND 1, WE HAVE A POSITIVE, DECREASING,
CONTINUOUS FUNCTION, WHICH WOULD BE EXPONENTIAL DECAY,
AS WE SEE HERE.
SO IF OUR SCATTER PLOT FITS THE PATTERN
OF ANY OF THESE FUNCTIONS,
EXPONENTIAL REGRESSION WOULD BE A GOOD CHOICE.
LET'S GO AHEAD AND TAKE A LOOK AT OUR FIRST EXAMPLE.
HERE WE HAVE SOME DATA THAT MEASURES THE WEIGHT
OF A SAMPLE OF RADIOACTIVE MATERIAL
OVER A PERIOD OF FIVE WEEKS.
IN THE PREVIOUS VIDEOS WE CREATED A SCATTER PLOT BY HAND,
BUT FOR THIS EXAMPLE WE'LL GO AHEAD AND CREATE
THE SCATTER PLOT DIRECTLY ONTO THE GRAPHING CALCULATOR.
SO THE FIRST STEP IS TO ENTER THE DATA INTO THE CALCULATOR.
WE'LL PRESS STAT AND THEN ENTER.
REMEMBER IF WE HAVE ANY OLD DATA IN HERE
WE CAN GO TO THE TOP OF THE COLUMN, PRESS CLEAR,
AND THEN ENTER,
AND IT WILL CLEAR THE ENTIRE COLUMN AT ONE TIME.
SO ENTER IN THE FIRST COLUMN IN L1
AND THE SECOND COLUMN INTO L2.
NEXT, TO CREATE THE SCATTER PLOT
WE HAVE TO SET UP OUR WINDOW TO MAKE SURE
THE POINTS OF OUR SCATTER PLOT SHOW ON THE SCREEN.
SO WE'RE GOING TO PRESS THE WINDOW KEY.
NOTICE THE X VALUES GO FROM 0 TO 5,
SO I'M GOING TO SET THE X MINIMUM AT -1
AND THE X MAXIMUM AT 6,
AND WE'LL GO AHEAD AND SCALE THIS BY ONES.
AND THEN FOR THE Y VALUES, THEY GO FROM 20 TO 50,
SO I'LL SET THE Y MIN AT 15 AND THE Y MAX AT 55,
AND WE'LL SCALE IT BY FIVES.
NOTICE HOW THE MIN AND MAX VALUES
ARE ALWAYS LESS THAN THE SMALLEST VALUE
AND MORE THAN THE LARGEST VALUE.
NOW AS LONG AS WE HAVE THE DATA IN L1 AND L2,
THERE'S A QUICK EASY WAY TO TURN THE SCATTER PLOT ON.
IF WE PRESS Y EQUALS, THE FIRST THING WE'RE GOING TO DO
IS CLEAR OUT THIS OLD EQUATION.
AND NOTICE HOW PLOT 1 IS HIGHLIGHTED.
THAT MEANS THAT SCATTER PLOT IS ALREADY TURNED ON.
SO IF IT WASN'T TURNED ON,
I'D PUSH THE UP ARROW UNTIL IT'S BLINKING ON PLOT 1,
AND THEN PRESS ENTER.
THIS IS THE ALTERNATIVE METHOD.
THE OTHER WAY TO TURN THE SCATTER PLOT ON
IS TO PRESS SECOND Y EQUALS, PRESS ENTER,
AND THEN GO THROUGH THE SETUP HERE.
BUT SINCE L1 AND L2 ARE THE DEFAULTS,
IT'S A LOT FASTER TO DO IT FROM THE SCREEN Y EQUALS.
NOW, IF WE PRESS GRAPH, WE HAVE OUR SCATTER PLOT,
AND IF WE PRESS THE TRACE KEY,
THE COORDINATES OF EACH POINTS WILL SHOW BELOW.
SO THEY CAN ALWAYS DOUBLE-CHECK OUR POINTS
TO MAKE SURE WE ENTERED THE DATA CORRECTLY.
EVERYTHING LOOKS GOOD. AND THIS LOOKS LIKE EXPONENTIAL DECAY,
SO EXPONENTIAL REGRESSION SHOULD BE A GOOD CHOICE
TO MODEL THIS DATA.
BUT BEFORE WE PERFORM THE REGRESSION
WE WANT TO MAKE SURE THAT R SQUARED,
OR THE COEFFICIENT OF DETERMINATION, IS PROVIDED.
SO WE'RE GOING TO TURN THE DIAGNOSTIC FEATURE ON
BY PRESSING SECOND ZERO.
WE'RE GOING TO SCROLL DOWN TO D AND LOOK FOR DIAGNOSTIC ON.
HERE IT IS.
SO WE'LL PRESS ENTER, AND THEN ENTER ONE MORE TIME.
AND NOW WE CAN PERFORM THE REGRESSION.
WE'RE GOING TO PRESS THE STAT KEY,
RIGHT ARROW ONCE TO CALCULATION,
AND LOOK FOR EXPONENTIAL REGRESSION,
WHICH IS OPTION 0.
SO WE'RE GOING TO PRESS ENTER.
NOW, BEFORE WE PRESS ENTER HERE,
WE WANT TO STORE THE REGRESSION EQUATION IN Y1.
SO WE'RE GOING TO PRESS THE VARS KEY, RIGHT ARROW ONCE, ENTER,
AND THEN ENTER TO SELECT Y1.
SO NOW WHEN WE PRESS ENTER IT WILL PERFORM THE REGRESSION,
GIVE US THE EQUATION AND ALSO STORE IT IN Y1.
SO HERE IS OUR EQUATION, HERE IS "A", HERE IS B.
NOTICE R SQUARED IS APPROXIMATELY .965,
SO IT LOOKS LIKE EXPONENTIAL REGRESSION
IS A PRETTY GOOD MODEL.
LET'S GO AHEAD AND LOOK AT THIS GRAPHICALLY.
THERE IS THE DATA,
AND THERE IS THE REGRESSION EQUATION,
AND YOU CAN SEE IT FITS THE DATA VERY WELL.
LET'S GO AHEAD AND WRITE THIS EQUATION DOWN,
AND ANSWER SOME QUESTIONS BASED UPON OUR EQUATION.
SO WE HAVE Y = APPROXIMATELY 46.222 x APPROXIMATELY .833
RAISED TO THE POWER OF X.
SO THE FIRST QUESTION,
HOW MUCH MATERIAL WOULD YOU PREDICT TO BE LEFT
AFTER 10 WEEKS?
SO USING OUR REGRESSION EQUATION
WE WANT TO KNOW WHAT WOULD Y BE WHEN X = 10?
AND LET'S GO AHEAD AND ANSWER THIS
USING THE GRAPHING CALCULATOR.
THIS IS ONE OF THE MAIN REASONS
WHY IT'S HELPFUL TO STORE THE EQUATION IN Y1.
WE'RE GONG TO USE THE TABLE FEATURE TO ANSWER THIS QUESTION.
LET'S MAKE SURE OUR TABLE IS SET UP CORRECTLY.
LET'S PRESS SECOND WINDOW.
WE'LL HAVE IT START AT 0,
AND HAVE THE CHANGE IN THE TABLE EQUAL TO 1.
AND WE'LL LEAVE THESE BOTH ON AUTOMATIC.
NOW, IF WE PRESS SECOND GRAPH,
FOR EVERY X IT SHOWS THE CORRESPONDING Y VALUE.
NOTICE THAT WHEN X = 0 THE FUNCTION VALUE
IS APPROXIMATELY 46.22, OR THE VALUE OF "A".
THIS REPRESENTS THE INITIAL AMOUNT
AT THE BEGINNING OF THE EXPERIMENT.
AND NOTICE THAT ACCORDING TO OUR DATA IT WAS ACTUALLY 50 GRAMS,
BUT ACCORDING TO OUR MODEL IT WAS ONLY 46.22.
SO THERE IS A MARGIN OF ERROR,
BECAUSE THIS IS NOT A PERFECT MODEL,
BUT IT DOESN'T MEAN IT CAN'T BE USED TO MAKE PREDICTIONS.
OKAY, SO TO ANSWER OUR QUESTION HOW MUCH IS LEFT AFTER 10 WEEKS,
WE'LL JUST SCROLL DOWN TO X = 10.
AND ACCORDING TO OUR MODEL,
YOU WOULD HAVE APPROXIMATELY 7.4 GRAMS OF MATERIAL
LEFT AFTER 10 WEEKS.
NUMBER TWO, WHAT IS THE HALF LIFE OF THE MATERIAL?
AGAIN, WE'LL ANSWER THIS USING THE GRAPHING CALCULATOR.
AGAIN, ACCORDING TO OUR MODEL
THE INITIAL AMOUNT WAS 46.222 GRAMS,
SO HALF OF THIS WOULD BE 23.111.
SO WHAT WE'RE GOING TO DO IS PRESS Y EQUALS,
AND WE'RE GOING TO GRAPH 23.111 IN Y2,
AND SEE WHERE THIS HORIZONTAL LINE
INTERSECTS OUR EXPONENTIAL FUNCTION.
SO IF WE PRESS GRAPH,
THE X VALUE OF THIS POINT OF INTERSECTION
WOULD REPRESENT THE HALF LIFE FOR THE GIVEN MODEL.
SO WE'LL PRESS SECOND TRACE FOR THE CALCULATION MENU.
OPTION 5 WILL GIVE US THE INTERSECTION POINTS.
SO WE'LL PRESS 5, AND NOW WE'LL JUST PRESS ENTER, ENTER,
AND THEN FOR GUESS LET'S GO AHEAD
AND JUST MOVE THE CURSOR CLOSER TO THAT POINT OF INTERSECTION
AND PRESS ENTER.
AND SO THE HALF LIFE IS APPROXIMATELY 3.79 WEEKS.
LET'S GO BACK AND LOOK AT OUR DATA ONE MORE TIME.
ACCORDING TO THE DATA,
NOTICE THAT 50 GRAMS IS REDUCED TO 25 GRAMS AFTER THREE WEEKS.
SO ACCORDING TO THE MODEL IT WAS APPROXIMATELY 3.8,
EVEN THOUGH THE ACTUAL DATA SUGGESTS
IT WOULD BE EXACTLY THREE WEEKS.
AGAIN, WE HAVE A MARGIN OF ERROR.
NUMBER THREE, WHEN WILL 5 GRAMS BE LEFT?
LET'S GO BACK TO THE GRAPHING CALCULATOR.
PRESS Y EQUALS AND NOW WE'LL REPLACE 23.11 WITH 5 GRAMS,
AND DETERMINE THE POINT OF INTERSECTION
OF THESE TWO FUNCTIONS.
AND NOTICE WE'RE NOT SEEING Y EQUALS 5.
THAT'S BECAUSE THAT'S THE WAY WE SET UP OUR WINDOW.
SO WE'RE GOING TO HAVE TO ADJUST THE WINDOW
TO SEE THAT POINT OF INTERSECTION.
SO WE'LL HAVE TO DECREASE THE Y MINIMUM.
LET'S GO AHEAD AND CHANGE THIS TO -5.
WE'RE PROBABLY ALSO GOING TO HAVE TO EXTEND THE X AXIS.
LET'S GO AHEAD AND CHANGE THIS TO 12 AND SEE WHAT THAT DOES.
LOOKS LIKE WE NEED TO EXTEND OUR X AXIS A LITTLE BIT FURTHER.
LET'S GO AHEAD AND EXTEND IT TO 20.
NOTICE HOW WE'RE MAKING A PREDICTION WAY
OUTSIDE THE GIVEN DATA VALUES,
WHICH MEANS THERE MAY BE A MUCH LARGER MARGIN OF ERROR.
LET'S GO AHEAD AND SEE WHAT WE COME UP WITH.
PRESS SECOND TRACE FOR THE CALCULATION MENU,
AND THEN OPTION 5 AGAIN.
ENTER FOR THE FIRST CURVE, ENTER FOR THE SECOND CURVE.
LET'S GO AHEAD AND MOVE THE CURSOR CLOSER
TO THAT POINT OF INTERSECTION
BEFORE WE PRESS ENTER ONE MORE TIME.
SO ACCORDING TO THE MODEL WE'LL HAVE 5 GRAMS LEFT
AFTER APPROXIMATELY 12.16 WEEKS.
THE LAST QUESTION ASKS US IS THIS A GOOD MODEL?
WHY OR WHY NOT?
WELL, LOOKING AT THE CALCULATOR, R SQUARED IS CLOSE TO 1,
WHICH TELLS US THAT APPROXIMATELY 96.5%
OF THE VARIATION OF THE DATA
COULD BE EXPLAINED USING OUR REGRESSION MODEL.
SO I WOULD SAY IT'S A VERY GOOD MODEL,
EVEN THOUGH MAKING THESE PREDICTIONS
AND COMPARING IT TO THE ACTUAL DATA,
WE DID SEE THAT THERE WAS A MARGIN OF ERROR.
BUT THAT'S TRUE FOR ALMOST EVERY MODEL.
SO I'LL LEAVE YOU TO THINK ABOUT THIS LAST QUESTION
A LITTLE BIT MORE.
WE'LL GO AHEAD AND STOP HERE.
THANK YOU FOR WATCHING, AND HAVE A GOOD DAY.