1 00:00:02,830 --> 00:00:05,200 So this is the class where I risk losing you. 2 00:00:05,200 --> 00:00:09,058 But, I hope you'll see with me and see that the math really isn't so bad. 3 00:00:09,058 --> 00:00:12,090 We're only going to use a small amount of math to predict the future. 4 00:00:13,100 --> 00:00:16,180 Now, there's nothing that seems to be more satisfying to people 5 00:00:16,180 --> 00:00:20,210 than making predictions, especially when they turn out to be correct. 6 00:00:20,210 --> 00:00:22,680 But the math has some other useful properties later 7 00:00:22,680 --> 00:00:25,400 on that we will use when we investigate experiments. 8 00:00:26,440 --> 00:00:31,010 So I'm going to go back to the popcorn results from the prior class, 2A. 9 00:00:31,010 --> 00:00:33,720 And I've redrawn the cube plot here for you. 10 00:00:33,720 --> 00:00:38,000 By the end of this video you'll be able to predict the number of popcorn we get. 11 00:00:39,070 --> 00:00:41,540 The prediction has three parts. 12 00:00:41,540 --> 00:00:44,840 The first part, is the baseline amount of popcorn we expect. 13 00:00:46,180 --> 00:00:49,117 Then we're going to add to that the additional 14 00:00:49,117 --> 00:00:52,070 amount due to the cooking time, the "A factor"". 15 00:00:52,070 --> 00:00:56,470 And then there's the additional amount due to the popcorn type, the "B factor". 16 00:00:57,490 --> 00:01:00,760 I'm going to show you how to make predictions first, then go into 17 00:01:00,760 --> 00:01:05,030 the details of how we got these numbers, 67, 10 and 4. 18 00:01:06,230 --> 00:01:08,660 Recall that shorter cooking times and white 19 00:01:08,660 --> 00:01:11,555 corn both resulted in fewer number of popcorn. 20 00:01:12,730 --> 00:01:16,510 Let's try to predict the number of popped corn under these conditions. 21 00:01:16,510 --> 00:01:20,255 We start with the baseline value of 67, then the effect of 22 00:01:20,255 --> 00:01:24,920 10 is multiplied by -1 because we're at short cooking times. 23 00:01:26,030 --> 00:01:30,650 And the effect of 4 is multiplied by -1 because we're using white corn. 24 00:01:31,960 --> 00:01:35,640 This gives a prediction of 53 popped corns. 25 00:01:35,640 --> 00:01:37,670 That's pretty close to the actual value of 52. 26 00:01:37,670 --> 00:01:42,450 Let's try making a prediction over here, at the top right 27 00:01:42,450 --> 00:01:46,640 hand corner, where we had both long cooking times and yellow corn. 28 00:01:47,740 --> 00:01:50,380 The prediction still has three plots. 29 00:01:50,380 --> 00:01:53,960 We add up our baseline value of 67 + 10 30 00:01:53,960 --> 00:01:57,730 units due to the longer time with a +1 multiplier. 31 00:01:59,080 --> 00:02:03,245 And the additional 4 popcorns are due to multiplying by +1 32 00:02:03,245 --> 00:02:07,870 for the corn type. We get a total value of 81. 33 00:02:07,870 --> 00:02:09,880 That's really a good prediction. 34 00:02:11,260 --> 00:02:13,840 Now where did these values come from? 35 00:02:13,840 --> 00:02:17,380 The baseline value of 67 is the easiest one to calculate. 36 00:02:17,380 --> 00:02:22,136 It's simply the average of the four values here on the cube. 37 00:02:22,136 --> 00:02:28,340 52 + 74 + 62 + 80 and then divide that by 4 which is equal to 67. 38 00:02:28,340 --> 00:02:31,160 How did we get the value of 10? 39 00:02:31,160 --> 00:02:36,790 That is the effect of cooking time. Always go from high to low. 40 00:02:38,450 --> 00:02:43,830 The difference from high to low using yellow popcorn is 80 - 62. 41 00:02:43,830 --> 00:02:44,260 That's 18. 42 00:02:44,260 --> 00:02:50,310 The difference from high to low when using white popcorn is 74 - 52. 43 00:02:50,310 --> 00:02:52,470 That's 22. 44 00:02:52,470 --> 00:02:57,850 So 18 and 22: and the average of those two numbers is 20; 45 00:02:57,850 --> 00:03:03,700 and 20 tells us that is the increase number of popcorns, 46 00:03:03,700 --> 00:03:09,070 when we go from 160 seconds of cooking to 200 seconds. 47 00:03:09,070 --> 00:03:12,350 But, it's our convention that we don't report the 20. 48 00:03:12,350 --> 00:03:16,510 We actually report half the size, a value of +10. 49 00:03:16,510 --> 00:03:19,160 And that's where that "+10" comes from. 50 00:03:20,250 --> 00:03:25,460 So, if it's a 20 unit increase for every 40 seconds of cooking time, 51 00:03:25,460 --> 00:03:30,440 it's then a 10 unit increase for every 20 seconds of increased cooking time. 52 00:03:30,440 --> 00:03:31,920 Simply halve the values. 53 00:03:33,010 --> 00:03:36,510 You might already suspect why we use half the value. 54 00:03:36,510 --> 00:03:40,470 The reason is because we're jumping here from -1 to +1. 55 00:03:40,470 --> 00:03:43,940 And that's a leap of two units. 56 00:03:43,940 --> 00:03:49,280 It involves a step from -1 to 0, and then another step from 0 to +1. 57 00:03:50,750 --> 00:03:53,310 The reason why we halve is we'd rather the 58 00:03:53,310 --> 00:03:57,590 effect of a single step than a full two-step. 59 00:03:57,590 --> 00:04:00,260 Next, consider the effect of popcorn type. 60 00:04:00,260 --> 00:04:03,170 Again, always go from high to low. 61 00:04:03,170 --> 00:04:07,992 At long cooking times, this corresponds to 80 - 74. 62 00:04:07,992 --> 00:04:08,517 That's 6. 63 00:04:09,700 --> 00:04:13,550 At short cooking times, this is 62 - 52, which equals 10. 64 00:04:13,550 --> 00:04:17,050 The average of 6 and 10 is 8. 65 00:04:17,050 --> 00:04:21,740 So we conclude that an average of an 8 unit increase 66 00:04:21,740 --> 00:04:25,520 will happen when we change from white corn to yellow corn. 67 00:04:25,520 --> 00:04:27,189 We saw that in the previous class [2A]. 68 00:04:28,420 --> 00:04:31,820 Again, by convention, we report half the value. 69 00:04:31,820 --> 00:04:34,100 So in this case that's a 4 unit increase. 70 00:04:35,270 --> 00:04:38,970 So now you can see where we got these values of 67, 10 and 4. 71 00:04:38,970 --> 00:04:44,230 Now I know I haven't really spoken about what this xA and xB are. 72 00:04:45,250 --> 00:04:47,160 These are variables. 73 00:04:47,160 --> 00:04:50,930 Specifically we call them "coded variables" and in this 74 00:04:50,930 --> 00:04:55,330 area of work the word "code" means "to represent". 75 00:04:56,860 --> 00:05:00,500 So for example, in variable xB we let -1 76 00:05:00,500 --> 00:05:04,460 represent white corn and we let +1 represent yellow corn. 77 00:05:05,730 --> 00:05:08,590 For xA the representation is similar. 78 00:05:08,590 --> 00:05:14,330 The -1 represents 160 seconds and the +1 represents 200 seconds. 79 00:05:20,110 --> 00:05:22,246 How would you represent a 190 seconds? 80 00:05:22,246 --> 00:05:26,266 81 00:05:26,266 --> 00:05:29,046 There is a way to move from real world units to these 82 00:05:29,046 --> 00:05:32,039 coded units and I will show you that in a future class. 83 00:05:33,050 --> 00:05:34,510 Now I have another question for you. 84 00:05:35,900 --> 00:05:38,300 What is the prediction for the case when we were 85 00:05:38,300 --> 00:05:42,250 using white corn and a cooking time of 200 seconds? 86 00:05:43,360 --> 00:05:45,800 Feel free to pause the video and answer that question. 87 00:05:49,890 --> 00:05:51,340 I'll give you a hint if you are stuck. 88 00:05:52,450 --> 00:05:56,710 xA is coded as +1 for 200 seconds of cooking 89 00:05:56,710 --> 00:06:00,890 time, and xB is coded as -1 for white corn. 90 00:06:00,890 --> 00:06:01,390 91 00:06:02,979 --> 00:06:10,350 So the prediction is 67 + 10 - 4 which gets you a value of 73. 92 00:06:10,350 --> 00:06:10,850 93 00:06:13,420 --> 00:06:16,610 The final question: what is your prediction for white 94 00:06:16,610 --> 00:06:19,619 corn, and a cooking time of 180 seconds? 95 00:06:20,650 --> 00:06:23,259 Feel free to pause the video and review the previous part. 96 00:06:23,259 --> 00:06:26,874 97 00:06:26,874 --> 00:06:31,260 The prediction is made here with xA = 0. 98 00:06:31,260 --> 00:06:33,740 That's our coding for 180 seconds. 99 00:06:34,990 --> 00:06:40,180 We showed in the previous part that 180 seconds is midway between 160 and 200. 100 00:06:40,180 --> 00:06:45,970 And so the coded value for xA is also halfway 101 00:06:45,970 --> 00:06:48,630 between -1 and +1, in other words, 0. 102 00:06:48,630 --> 00:06:54,700 A coded value for xB is -1 for white corn, 103 00:06:54,700 --> 00:07:01,650 and so, if we use all of that together now, we get 67 + 0 - 4. 104 00:07:01,650 --> 00:07:04,509 That gets us the prediction of 63 popped corns. 105 00:07:06,060 --> 00:07:08,160 Is this prediction reasonable? 106 00:07:08,160 --> 00:07:11,600 Well notice that 63 is a number that falls exactly midway 107 00:07:11,600 --> 00:07:15,960 between 52 and 74. So yes, this prediction makes perfect sense. 108 00:07:17,400 --> 00:07:19,820 I think that's enough for today's class. 109 00:07:19,820 --> 00:07:22,710 In the next class I'm going to fine-tune this model and add 110 00:07:22,710 --> 00:07:26,400 an extra term that's going to show us what interactions really mean.