- WELCOME TO THE FIRST EXAMPLE OF QUADRATIC REGRESSION.
THE GOALS OF THIS VIDEO ARE TO PERFORM QUADRATIC REGRESSION
ON THE TI84 GRAPHING CALCULATOR,
DETERMINE HOW WELL THE REGRESSION MODEL FITS THE DATA,
AND THEN MAKE PREDICTIONS USING THE REGRESSION EQUATION.
IN STATISTICS, REGRESSION ANALYSIS INCLUDES
ANY TECHNIQUES USED FOR MODELING AND ANALYZING TRENDS
BETWEEN A DEPENDENT VARIABLE AND AN INDEPENDENT VARIABLE.
REGRESSION ANALYSIS HELPS US PREDICT THE UNKNOWN,
USING THE PATTERN OF THE KNOWN DATA.
AND AGAIN, THIS VIDEO FOCUSES ON QUADRATIC REGRESSION,
BUT I DO HAVE SEVERAL OTHER VIDEOS
THAT FOCUS ON DIFFERENT TYPES OF REGRESSION.
SO IN GENERAL, TO ANALYZE THE DATA
WHAT WE DO IS MAKE A SCATTER PLOT,
OR PLOT THE DATA AS POINTS ON THE COORDINATE PLANE,
AND THEN TRY TO IDENTIFY WHAT TYPE OF FUNCTION
WOULD BEST FIT THE DATA.
AND WE CAN ALSO USE R SQUARED,
OR THE COEFFICIENT OF DETERMINATION,
TO DETERMINE WHAT PERCENT OF THE VARIATION
CAN BE ACCOUNTED FOR BY THE MODEL,
AND WE'LL DO THAT IN THIS VIDEO AS WELL.
SO AGAIN, WE'RE FOCUSING ON QUADRATIC REGRESSION.
IF WE CREATE A SCATTER PLOT,
AND THE DATA FITS THE PATTERN OF A QUADRATIC FUNCTION,
AS WE SEE HERE PICTURED IN DIFFERENT COLORS,
WE COULD USE A QUADRATIC EQUATION TO MODEL THE DATA
AND MAKE PREDICTIONS.
LET'S GO AHEAD AND TAKE A LOOK AT OUR EXAMPLE.
HERE WE HAVE SOME DATA ABOUT THE REVENUES OF EXXON MOBIL
FROM THE YEARS 2000 THROUGH 2005.
SO WHAT WE'LL DO IS PLOT THE PAIRED DATA
AS ORDERED PAIRS ON THE COORDINATE PLANE,
AND SEE IF THE DATA CAN BE MODELED BY A QUADRATIC EQUATION.
NOW IT'S TYPICAL WHEN X IS A YEAR
TO LET THE BASE YEAR REPRESENT X = 0.
SO THE YEAR 2000 WILL BE X = 0, 2001 X WILL BE 1, 2002, 2,
AND SO ON ALL THE WAY TO X = 5.
SO THE FIRST POINT WE'LL PLOT WILL BE 0,236,
BUT BEFORE WE DO THAT WE SHOULD SCALE THE AXES
TO MAKE SURE OUR DATA WILL FIT ON THE COORDINATE PLANE.
AND NOTICE THAT I'VE ALSO LABELED THE X AND Y AXES.
SO THE X AXIS MUST GO FROM 0 TO 5,
AND THE Y AXIS MUST INCLUDE THE VALUES FROM 236
ALL THE WAY TO 375.
NOW SINCE THE MINIMUM VALUE FOR Y IS 236,
LET'S BREAK THE Y AXIS SOMETHING LIKE THIS,
AND THEN START AT, LET'S SAY, 200,
AND WE'LL HAVE A MAXIMUM VALUE OF 400.
AGAIN, THIS SYMBOL HERE INDICATES
THERE'S A BREAK IN THE Y AXIS.
AND NOW WE'LL GO AHEAD AND PLOT THESE SIX POINTS.
THE FIRST POINT IS 0,236, 1,214, 2,207, 3,250, 4,300, AND 5,375.
SO YOU CAN SEE THE PATTERN OF THIS DATA
DOES FIT THE SHAPE OF A QUADRATIC FUNCTION
THAT OPENS UPWARD.
NOW LET'S GO AHEAD AND DUPLICATE THE SCATTER PLOT
ON THE GRAPHING CALCULATOR,
AND THEN WE'LL DETERMINE THE REGRESSION EQUATION
AS A QUADRATIC FUNCTION.
TO ENTER OUR DATA WE'LL PRESS THE STAT KEY, AND THEN ENTER.
NOTICE I HAVE SOME OLD DATA IN L1 AND L2.
IF WE GO TO THE TOP OF THE COLUMN,
PRESS CLEAR, ENTER, IT'LL CLEAR THE ENTIRE COLUMN AT ONE TIME.
LET'S DO THE SAME ON L1, CLEAR, ENTER.
AND NOW ENTER IN OUR X VALUES, WHICH WILL BE 0 THROUGH 5.
NOW ENTER THE Y VALUES IN L2.
NEXT WE'LL SET UP THE X AND Y AXES LIKE WE DID HERE BY HAND,
BY PRESSING WINDOW,
AND THEN SETTING THE X AND Y MINS AND MAXS.
SO WE KNOW THE X VALUES GO FROM 0 TO 5,
BUT I WANT TO SHOW THE ORIGIN.
SO I'M GOING TO GO FROM -1 TO 6,
SCALED BY ONES, AND THEN FOR Y WE CAN GO FROM 200 TO 400,
AS WE DID BY HAND.
LET'S GO AHEAD AND SCALE THIS BY 50s.
NOW LET'S GO AHEAD AND TURN THE SCATTER PLOT ON.
WE'LL PRESS SECOND Y EQUALS.
IT'S ACTUALLY ALREADY ON,
BUT LET'S GO AHEAD AND PRESS ENTER.
IF IT WASN'T ON, WE'D PLACE THE CURSOR HERE
WHERE IT'S BLINKING ON AND PRESS ENTER.
THE SCATTER PLOT IS THE FIRST OPTION,
AND WE HAVE L1 AND L2 FOR X AND Y,
SO EVERYTHING LOOKS GOOD.
LET'S GO AHEAD AND PRESS GRAPH,
AND WE CAN SEE THAT OUR SCATTER PLOT ON THE CALCULATOR
IS VERY SIMILAR TO THE SCATTER PLOT THAT WE DID BY HAND.
NOW WE WANT TO GO AHEAD
AND DETERMINE THE REGRESSION EQUATION,
BUT WE ALSO WANT TO MAKE SURE
THE CALCULATOR GIVES US THE COEFFICIENT OF DETERMINATION.
SO WE NEED TO MAKE SURE OUR DIAGNOSTIC TOOL IS TURNED ON.
IF WE PRESS SECOND ZERO,
THAT WILL TAKE US TO THE CATALOG,
AND WE'RE GOING TO SCROLL DOWN AND LOOK FOR DIAGNOSTIC ON.
HERE IT IS, SO GO AHEAD AND PRESS ENTER,
AND THEN ENTER ONE MORE TIME.
AND NOW R SQUARED WILL SHOW
WHEN WE DETERMINE THE REGRESSION EQUATION.
SO NOW WE'RE GOING TO PRESS THE STAT KEY,
RIGHT ARROW ONCE FOR CALCULATION,
AND THEN OPTION 5 IS QUADRATIC REGRESSION, SO WE'LL PRESS 5.
NOW, BEFORE WE PRESS ENTER,
WE'RE GOING TO GO AHEAD
AND HAVE THE CALCULATOR STORE THE REGRESSION EQUATION IN Y1.
TO DO THAT WE CAN PRESS THE VARS KEY, RIGHT ARROW ONCE TO Y VARS,
PRESS ENTER, AND THEN ENTER ONE MORE TIME TO SELECT Y1.
AND NOW WHEN WE PRESS ENTER
THIS WILL DETERMINE THE REGRESSION EQUATION
AND STORE IT IN Y1.
SO NOTICE IT GIVES US A, B, AND C FOR OUR QUADRATIC MODEL,
AND IT ALSO GIVES US R SQUARED, WHICH IS APPROXIMATELY .99,
WHICH INDICATES THIS IS AN EXCELLENT MODEL.
SO WE KNOW IT'S ALREADY IN Y1.
LET'S GO AHEAD AND WRITE THIS DOWN ON OUR SCREEN,
AND WE'LL ROUND TO TWO DECIMAL PLACES.
OUR FIRST QUESTION ASKS IS THE EQUATION A GOOD FIT
FOR THE DATA?
WHY OR WHY NOT?
THIS IS THE MAIN REASON WHY WE WANTED TO HAVE THE CALCULATOR
GIVE US R SQUARED.
THE COEFFICIENT OF DETERMINATION IS APPROXIMATELY 99.4%,
WHICH TELLS US THE PERCENT OF VARIABILITY
THAT COULD BE EXPLAINED BY THIS MODEL.
AND SINCE THIS IS VERY CLOSE TO 1,
THIS IS AN EXCELLENT MODEL FOR THE GIVEN DATA.
SO WE CAN EXPLAIN THIS IN DETAIL,
BUT THE MAIN REASON IS BECAUSE
R SQUARED IS APPROXIMATELY = .99, OR 99%,
WHICH IS VERY CLOSE TO 1.
AND THE CLOSER R SQUARED IS TO 1, THE BETTER THE MODEL.
NUMBER TWO, WE WANT TO PREDICT THE REVENUE IN THE YEAR 2012.
WE NEED TO BE A LITTLE BIT CAREFUL HERE,
BECAUSE REMEMBER IF WE GO BACK TO OUR DATA,
THE YEAR 2000 WAS REPRESENTED BY X = 0.
SO FOR THE YEAR 2012, THAT WOULD BE X = 12.
SO WE'RE GOING TO SUBSTITUTE 12 INTO OUR MODEL,
AND SEE WHAT THE Y VALUE WOULD BE,
BECAUSE Y REPRESENTS THE REVENUE IN BILLIONS OF DOLLARS.
WE'RE GONG TO GO AHEAD AND DO THIS ON THE GRAPHING CALCULATOR
USING THE TABLE FEATURE.
LET'S MAKE SURE OUR TABLE IS SET UP CORRECTLY.
IF WE PRESS SECOND WINDOW,
WE'LL HAVE OUR TABLE START AT 0, INCREASE BY 1,
AND WE'LL LEAVE BOTH OF THESE AS AUTOMATIC.
SO NOW IF WE PRESS SECOND GRAPH,
WE CAN JUST SCROLL DOWN TO X = 12,
AND THE Y VALUE WILL BE THE PREDICTED REVENUE FOR THAT YEAR.
SO IT LOOKS LIKE THE PREDICTED REVENUE
IS GOING TO BE $1,645.9 BILLION,
WHICH IS THE SAME AS SAYING $1.6459 TRILLION.
NOW, YOU MIGHT BE ASKED IS THIS A GOOD PREDICTION
OF THE REVENUE FOR THIS YEAR?
LET'S LOOK AT THE GRAPH JUST FOR A MOMENT.
IF WE PRESS THE TRACE KEY,
AND RIGHT ARROW TO THE LAST POINT ON OUR SCATTER PLOT,
THE DATA THAT WE USED WAS ONLY THROUGH THE YEAR 2005.
SO WE'RE USING EXTRAPOLATION TO MAKE THIS PREDICTION,
WHICH IS SEVEN YEARS PAST THE GIVEN DATA.
SO THIS WOULD ONLY BE A GOOD PREDICTOR
IF WE KNEW THE TREND WAS GOING TO CONTINUE IN THE SAME PATTERN.
AND WE CAN SEE FROM PREVIOUS YEARS AT TIMES
THEY HAVE EXPERIENCED A DIP IN REVENUE,
SO THIS MAY OR MAY NOT BE A GOOD PREDICTION,
BECAUSE IT'S SEVERAL YEARS PAST THE GIVEN DATA
USED TO CREATE THIS REGRESSION EQUATION.
NUMBER FOUR ASKS WHEN WILL THE REVENUE
REACH $500 BILLION?
SO THEY'RE GIVING US THE Y VALUE,
AND ASKING US TO DETERMINE THE X VALUE.
SO LET'S GO BACK TO OUR TABLE,
AND NOW WE'RE GOING TO LOOK FOR A Y VALUE OF APPROXIMATELY 500,
AND SEE WHAT THE X VALUE WOULD BE.
SO AT THE END OF THE SIXTH YEAR IT'S NOT QUITE $500 BILLION,
BUT BY THE END OF THE SEVENTH YEAR IT'S OVER $600 BILLION.
SO REVENUE WILL REACH $500 BILLION SOMEWHERE
DURING THE SEVENTH YEAR.
AND WHEN X = 7, THAT WOULD BE THE BASE YEAR OF 2000 + 7,
OR SOMETIME DURING THE YEAR 2007
REVENUE WOULD REACH $500 BILLION.
THE LAST QUESTION IS KIND OF AN OPEN-ENDED QUESTION.
IF YOU WERE AN INVESTOR,
WHAT OTHER INFORMATION WOULD YOU WANT BEFORE YOU INVESTED
IN EXXON MOBIL?
WELL, FIRST YOU MAY HAVE MORAL ISSUES ABOUT INVESTING
IN AN OIL COMPANY TO BEGIN WITH,
BUT IF YOU WERE GOING TO INVEST IN THIS COMPANY,
OF COURSE YOU'D ALSO WANT TO KNOW ABOUT POSSIBLE LAWSUITS,
HOW MUCH THEY'RE INVESTING IN ALTERNATIVE ENERGY,
AND ANY OTHER ISSUES THAT MIGHT BE A CONCERN TO YOU.
I THINK WE'LL STOP HERE FOR THIS VIDEO.
WE'LL TAKE A LOOK AT A SECOND EXAMPLE IN THE NEXT VIDEO.
THANK YOU FOR WATCHING.