SOM 306
Monday, February 17, 2014
Typewell; Dave Strong
Sirob Malkonian, Pamela Torres

Professor:   Welcome to the fourth week of our class.  By the end of this week we are done with about 25% of our course, next Monday you will have a quiz about 8 or 9 multiple choice questions.  That will be on moving average, exponential smoothing, process flow strategy.  You will have 20 minutes, we will distribute the paper at 8am, I will bring paper, I will give it to the person here, she will put the top one here then take the next from top, pass it to the gentlemen, he takes the next from top, and then this gentlemen takes the last set.  

So 4 sets here, 5 sets here and so on.  So in one minute we distribute the paper and then 20 minutes for the quiz.  Any questions?  Bring a scantron, that's it.  Nothing on your desk.  First page is double sided, 8 or 9 questions.  Very simple questions.  Moving average, exponential smoothing, extremely simple questions.  If you have studied don't worry.  

Strategy and process flow, very obvious questions.  Very basic.  

Male Student:   What kind of scantron?  

Professor:   Just a usual kind [Class laughing.]  Bring one with you.  

Female Student:   Are you going over the quiz?  

Professor:   Quiz questions, you need to come to my office ... qualitative for quiz questions, if you have problem with that you need to come to my office.  Quantitative quiz questions, you shouldn't have any questions.  Quizzes are exactly 100%, not 99%, 100% the same as the solved assignment.  

You can find the counterpart in the solved.  The only thing you need is to replace the numbers in the assignment with the numbers.  The others will go in the next quiz.  

Don't forget, if I solve 1 million problems in this classroom, unless you do it yourself, it doesn't have any value.  

If you have any questions regarding your quiz, if you think it was unfairly graded, come to me.  I may say "this problem is the same as this one"

This is the result of the first quiz you took, this is the result of the second [On overhead.]   This is process flow, this is advanced moving average, this is exponential smoothing.  [On overhead.]   

By now, at the end of the third week of classes you have taken 6 quizzes.  I'm not sure if in any other class on campus, so early in the semester they can give you feedback on where you are standing, what are the expectations and what is the roadmap to success?  If you have questions I am glad to answer them.  

This is a quantitative course, we play with numbers.  

120 people have got 100 in this quiz [On overhead.]   Some of them need to solve a couple more.  But roadmap is for all people to end with 100.  

You need to listen to the lesson captures, when you don't understand you need to stop it, rewind it and continue.  Very simple.  Any questions?  

Female Student:   Are the midterms going to qualitative?  

Professor:   Quantitative.  With exception of chapter 1 and 2, process flow and strategy, 97% of the rest of the course is quantitative.  

But memorize numbers, put them in the formulas and giving the answer has no value for me.  We would like to teach it as a total system, when you finish this course you want a takeaway.  

Male Student:   You say the quiz is the same as the slideshow?  The quiz on Moodle?  The quiz we are taking next week.  

Professor:   Listen, if you have taken the quizzes don't worry about it.  It's more simple than you did online.  It's simpler than what it was online for chapter 1 and chapter 2, very obvious questions.  Those which form the core concept of the course.  

Male Student:   You are saying the questions on the quiz are the same as the assignment?  You mean PowerPoint?  

Professor:   Which quiz?  

Male Student:   Monday quiz.  

Professor:   Monday quiz the questions will be simple!  Simpler than simple.  Online quizzes are exactly the same as assignments.  What I will do, copy assignment, piece it into Moodle.  Then where there are numbers I shift the text to the right, create an excel cell there and put number there.  

Then I link these numbers with a table.  I go to table and generate rational random numbers and create 50 versions of that number.  

For example I need to maintain that for group technology fixed costs should be greater than job shop and less than flow shop.  If I generate random numbers that violate this I fix them.  

Also variable cost of job shop should be greater than group shop.  So I answer the questions.  I create multiple choice problems and If I type 1 problem 1 appears, then I copy and paste it into another page.  

Therefore the core of all online quizzes are the solved assignments.  

For Monday's quiz you need to know basic, moving average, exponential, process flow and strategy.  I cannot tell you the question.  Any questions?  

I know first exponential smoothing problem, I teach a little recollection, you have taken it in SOM120 or MATH140.  Then I move backward and talk about job shop and flow shop.  Then I try to cover everything we have gone through during the lecture captures, on every subject up to the end of exponential smoothing.  

So exponential smoothing, what is exponential smoothing?  Exponential smoothing is a moving average, a wider moving average.  What is moving average?  

Say we have data, 100 period, 200 period, something.  If there are seat conflicts, fix it today.  Thank you for coming so early.  

We have 100, 200, 1000 numbers or periods.  Someone ask us "What is your forecast for the next period?"  I say "I will add up all the numbers I have and average it, that is my forecast for the next period.  So I have been very conservative here, I try to satisfy everybody and find if all the demand are correct what's the average for the next period's demand?  

That is one extreme.  On the other extreme we just may take the last and say "I only rely on the newest piece of data and my forecast for the next period'

Moving average is a mediation, a sort of compromise between these 2 extreme points.  Instead of relying on the last period, I rely on the last two periods.  Instead of two periods I rely on three.  That's three period moving average.  

The larger the number of periods the smoother the data and the less the impact of the last period.  This is 100%.  

Do not forget, we don't want you to memorize this.  When you go to class I may throw some data to you, some facts.  We may transform those data into information.  Then we make a little more play with those information and transfer those information to knowledge.  We may play with that knowledge and transfer our understanding.  

We may play with that then.  The more prepared you are in class, the more opportunity we have to go from memorizing things to applying them.  That is the whole idea.  

So in an end period moving average I try to find an appropriate place in the continuum between relying on all pieces of data and relying on the last piece.  

My measure of effectiveness is MAD.  Having said that, now I can think about something else.  I may say my forecast for the next period, which is period T+1 is equal to my forecast for the previous period plus a fraction of the difference between what my forecast was and what I observe.  [writing on board] 

So this is what my forecast was [On overhead.]  This is what I observed in reality [On overhead.]   

If I'm going to take all of that difference, 100% of that difference, what will I have?  I will have Ft + (At − Ft)

What is left is At.  If I set alpha to 1 period moving average .. if I put α = 0 then 0 is multiplied by this.  No matter what the reality is I won't make any change.  My forecast for this period is exactly what it was for this period.  

I am moving from somewhere which 100% relies on last period, and something which does not rely at all on the last period.  The question is where is the best place to stay?  How much should I give attention to the demand of the last period and it's derivation from my forecast.  So α is defined as a variable between 0 and 1.  If it's 1 my only focus is on the last period.  If it's 0 I have no respect for the last period.  I don't incorporate any new knowledge into my forecast.  

If it is 0.5 that means last period my forecast was 100, the actual demand came out 120, which is 100 units more, there's a 20 unit difference.  I don't take 100% of that and incorporate it.  I take 50%.  Okay?  That is how exponential smoothing works.  

Therefore exponential smoothing forecast for the next period equals ... [On overhead.]  Any questions? 

I can simplify this equation, I can multiply α for At and I can also multiply this [On overhead.]   Then I can put it together.  [writing on board.]  

This is another formula for exponential smoothing.  

Exponential smoothing can be forecast as [writing on board]

When alpha goes up, this part goes up, this part goes down.  This means I pay more attention to recent periods.  If alpha goes down I pay more attention to this.  As I explained my lecture, the exponential smoothing is a moving average where all pieces of data are taken into account.  However it's weighted.  The weight of all elements are low?  Okay.  Any questions? 

So after this introduction ... okay, I'm sure all of you can solve this problem [ reading from the overhead ] 

You know Monday's questions will be something like this.  Does anyone in this class not know how to solve this???  It will be extremely simple questions as long as moving average and exponential smoothing are concerned.  

[On overhead.]  

Again we put numbers into formula.  [ reading from the overhead ] Any questions? 

Okay.  [Teacher reading:   Question 3]

We know the actual for this period is ... 16000.  So I can put this actual and forecast into formula ... sorry, what?  This is our forecast for period 4, 16000.  α = 0.4.  

So I have the forecast for period 4, forecast is given, actual equals 0.4, I put it into the formula and I get 17600  Okay?  

Now I have actual and forecast for period 5, then I compute the forecast for the next year.  [On overhead.]  Agreed?  Any questions? 

Female Student:   Can you go back?  

Professor:    Again, same formula.  [Teacher reading:   Question 4.]   Question put this into the formula to compute.  Any questions?  No?  Spend one minute to solve this problem.  

[Students working.]  

Professor:   The previous forecast was 66, 5 units larger than the actual demand.  So this is exponential smoothing formula.  The previous forecast was 66, which was 5 units larger than the actual demand.  This was 66 and it was 5 units greater than ... 5 units larger than actual demand.  So actual - forecast = -5 right?  

Female Student:   What do you put in to get 5?  

Professor:   It's given to you.  

Female Student:   Oh, okay.  

Professor:   The previous forecast of 66 turned out to be 5 units larger.  [ reading from the overhead ] 

Our forecast for next period is 65.  Therefore we do 65 = 66 + -5 

α = 0.2 

Any questions? Any questions? 

Female Student:   Do we always keep it like that?  With the negative?  

Professor:   It can be positive, it could be negative.  What it says here, the previous forecast ... is Ft.  The previous actual is At 

Previous forecast was 66, which was 5 units larger than actual.  If that is difficult you can assume this ... forecast was 5 units larger than actual.  

If forecast was 5 units larger than actual, 66.  Therefore forecast was that.  

So we use those 5 units to compute 61, but we don't need to do that.  

If we subtract them, this is 5 units more than this, so a negative sign.  Right?  Then we have one equation, one unknown.  α = 0.2 

[Teacher reading:   Question 6]

Forecast error is A − F.  So previous forecast is F.  So a percentage of A − F and define it as exponential smoothing.  Exponential smoothing is new forecast equal to old forecast + alpha times actual.  

[Teacher reading:   Question 6] 

Is which?  It is D.  Any objection??  Next question?  

When you use large numbers you give more values to recent period observation.  If you give small that means you give less value to the most recent observation and more value to all before this, right?  Any questions? 

Any questions? 

Can you answer this question?  [On overhead.]  

Exponential smoothing, we want one period moving average.  [ reading from the overhead ] that is what we want.  Therefore what we want is this to become 0 and this to become 1.  If I set α = 1 then 1 − α = 0.  Right?  Any questions? 

What is the answer is that?  Question 9.  

This is a straight line, no matter if forecast is 0 or 7000, I stay as I was before.  [ reading from the overhead ]  This part becomes 0.  [On overhead.]   

Okay?  

Now we have 7 periods of data and we want to use 5 period moving average, exponential smoothing and compute MAD and compare.  Usually when we do forecasting, that's what you will do in the game is you draw the data to see if you observe a pattern.  Right?  Then we try to find via an appropriate method, which minimizes this.  

This is our data [On overhead.]   We don't see any specific pattern.  7 pieces of data.  We use 5 period moving average.  We will not be able to compute 5 period moving average until period 5.  So with period 7 I have these 5 numbers, added together, divided by 5, that's a moving average for period 7, which is my forecast for period 8.  

Male Student:   I have a question on the homework, you gave us a couple of periods ... like period 5 and 3 were the same, it didn't give us the rest of them.  How do we solve that?  

Professor:   We solved that before 

Male Student:   Oh.  

Professor:   We said ... suppose ... the question you are asking is something like this.  [On overhead.]   [Teacher reading:   Question 11]

Or perhaps you are asking this question.  [On overhead.]   

Male Student:   That one.  

Professor:   This one ..., we have 5 period moving average for period 20.  We have actual for period 21.  We have actual for period 20 - 5+1 which is period 16.  We want to compute moving average for period 21.  

We have the oldest piece of data in this period and the newest piece of data, the next period.  What we will do ... this is moving average for this period.  This is the oldest data [On overhead.]   This is 20.  

We want to compute this, this is the newest piece of data, correct?  

Look at the difference between these two, they are exactly the same [On overhead.]   This is equal to 800, I want to see what is the next one.  

Suppose we call the common elements this smiling cup.  So then 5 period average equals smiling mug plus all this data divided by 5.  

Then I can compute what the value of the smiling mug is ... 3150.  Then I put the smiling mug here [On overhead.]   [writing on board.]  

What happened in this process, I took 800, dropped the last piece of data, which was 850.  [writing on board] 

I drop the oldest piece of data, I add the newest data which is 900.  Because it's 5 period moving average I divide by 5.  That's 50 divided by 5 which is 10.  

Maybe you missed the quiz but now you can solve in midterm.  

Male Student:   In the future instead of the smiley cup can you put an X? 

Professor:   I can put an egg, not an x.  We don't put x because some people have problem with x.  [Class laughing.]   

Male Student:   Honestly, I was clicking on the smiley cup like you had something hidden under it.  

Professor:   No.  We can replace it with anything.  Those four numbers can equal what?  Whatever?  I thought the mug may be better.  

Okay.  

Now if I use 5 period moving average to calculate the next forecast I do this [ reading from the board ]  Right?  

If I'm going to forecast for whatever I can using 5 period moving average, the first time I can compute 5 period moving average is 5.  [On overhead.]   It's assumed as forecast for period 6.  5 period moving average of 7 forecast for 8.  

In 5 period moving average I only have two pieces of data to help me calculate MAD.  In no other place can I compare actual with forecast.  

In this period I have my forecast.  Here I have forecast and actual.  Here I have forecast and actual.  Here I have forecast but no actual.  

2 period isn't enough for a reliable MAD.  But that is all forecast using 5 period moving average.  

Now we go for exponential smoothing.  [ reading from the overhead ]  

We have just taken actual of February and assumed it as forecast for March.  In exponential smoothing, for the first forecast we can use several techniques.  In real life we have 50 periods of data.  If you use exponential smoothing one way is to assume forecast for 2 is the period 1.  

No one can criticize you while you use this one.  Personally, when I use exponential smoothing I compute average of all data and then build up.  Here we follow what I said.  Listen to what I say.  For first exponential smoothing forecast we need something.  As I said in my lecture you may assume actual of period 1 as forecast for period 2.  No one can criticize you.  

Or you may just put numbers you think are more reliable for forecast for period 1 or 2.  As long as I say nothing, usually we use actual of period 1 as forecast of period 2.  Which is what we do here [On overhead.]   

[ reading from the overhead ] 

Male Student:   Any reason for moving average of 1 and 2?  

Professor:   There is no logic to do that.  But if you do no one can criticize you.  You may use all, or 1 and 2.  But that's not common.  What is common is 1 as 2 or average of everything as 1.  

Here we are in period 2, actual is 18.  Forecast is 19.  [ reading from the overhead ] 

This gives us 18.8.  Right?  Correct?  Any questions? As soon as I have forecast for period 3 I can compute for all.  

Thank you Kaya, 100%.  From now on you take the seat you are in.  If you come and someone else is in your seat politely explain "if you sit here and you will be counted as me and I will be present, not you."  We don't look for faces, I barely remember names.  It's a good practice, they put most effort to knowing names.  I put more energy trying to improve and making the material easier.  

I don't remember the names, maybe names of 20%, that's maximum.  Then we don't know who is exactly sitting by face.  Always sit in your seat.  

So here we have exponential smoothing [On overhead.]   I was able to have forecast and actual for 6 periods.  The same is for naive technique [On overhead.]  

[ reading from the overhead ] 

We cannot take one for 3 periods, the next for 4th period.  They must have same number of periods and same periods.  

Here we have actual, naive method, exponential smoothing.  [On overhead.]   

This is the difference between actual and forecast.  [ reading from the overhead ] 

The method with lower MAD is preferred.  In this case we stay with exponential smoothing.  Right?  

What is the answer to this question?  [On overhead.]  We don't know, it's nonsense.  

What about this one?  [On overhead.]  True or false?  

Male Student:   False.  

Professor:   False, because when alpha is large we give more value to the most recent data.  Any questions? Age of data in exponential smoothing is 1/α 

What is age of data in moving average?  

Male Student:   [Can't hear/can't understand.]  

Professor:   The last piece of data is one period old in moving age.  The oldest piece is n period old.  

You have A and D, what is your average?  1 + 4 ÷ 2 

In moving average the newest data is one period old, the oldest is n period old.  

Why we can add these together and divide by 2?  Because the change is uniform.  The first period is 1 period old, the second is 2.  The last period is 1 period.  The oldest is n period old.  If changes like this - for example if the period before was 8 period old, then the last period was n period old we can't add the last and first together.  

When changes are smooth we go from large to small in a smooth way.  Otherwise we add them all together and divide by the number.  

For moving average the last piece of data is 1 period old, then 2, then 3 etc.  

If you want to find out what exponential smoothing performs like in moving average it is easy.  n + 1 ÷ 2 is age of data in moving average.  It equals 1 − α 

[On overhead.]  

Therefore α = 0.5 this is like this [On overhead.]   We know moving average like that has age of data 1/α = 1/0.5 = 2

So here age of data is 2 period.  

N + 1 / 2 = 2 

N + 1 = 4

N = 3

The conclusion is this, exponential smoothing with α = 0.5 is somehow similar to a moving average with N = 3

If α = 0.2, age of data in this exponential smoothing ... is 1/α = 1/0.2 = 5.  So age of data is 5 periods old.  

To see this exponential smoothing equivalent with what moving average?  [writing on board.]  

N + 1 / 2 = 5  N = 10 − 1 = 9 

So that's age of data in exponential smoothing and moving average.  It's common sense, changes are continuous 

Age of data in exponential smoothing follows a complicated mathematical equation, but we just accept the results.  

We combine this to get N + 1 / 2

Where the average age of the data in both techniques.  Any questions? 

So this is quite a simple problem [ reading from the overhead ] 
What is the advantage of 0.5?  What makes 0.5 a specific number in exponential smoothing?  

Female Student:   You give the same weight.  

Professor:   What's the meaning of that?  Come on?  I will give you extra point.  What is the meaning of adding them by 0.5?  What is the meaning of multiplying 10 by 0.5 and adding it to 20 multiplied by 0.5? 

Female Student:   Average.  

Professor:   Average.  You get extra point.  When it is 0.5 I can take actual and forecast, add them together and divide by 2.  

[ reading from the overhead ]  

So I can just add them together for the summation.  Right?  So 0.5 times this + 0.5 times this ... [ reading from the overhead ] 

What is the forecast for period 4?  Here's 300 for period 1.  I put as forecast for period 2.  

[ reading from the overhead ] 

Therefore my forecast for the next period is what?  Any questions? Any questions? 

Answer this question quickly.  [On overhead.]  

[Students working.]  

What is the answer?  We are talking about 6 period moving average.  I am period 100, I want forecast for 101.  I want to use 6 period moving average.  The most recent piece of data is 100.  The oldest piece of data is 6.  

[ reading from the overhead ] 

In a 6 period moving average, average age of data is 3.5 periods old.  

[ reading from the overhead ] 

So α = 0.29 is equivalent to 6 periods moving average.  They are the same, right?  

Okay.  

We talked about exponential smoothing and moving average.  Finding if 2 period is better, 5 period moving average is better, 7 period moving average is better.  Our measure was average of summation of the absolute value of the difference between actual and forecast.  

So take actual, take forecast, find the difference.  Drop the negative sign, add them together, divide by number of observation.  I select that number of periods which leads to minimal MAD.  

So they find the square.  The square is another way to drop a negative sign.  -5 squared becomes 25.  If it's 5 and you square it, it's 25.  

So if forecast is more than actual or actual is more than forecast it doesn't matter, both are bad.  

In different cases we assign different weights to positive or negative, but we don't go there in this course.  In this course we assume overestimate is as bad as underestimate.  

In regression they use square instead of absolute value, why?  Mathematically dealing with squares is easier than absolute value.  

So one reason for going there was - the main reason for replacing absolute value with squares was ease of mathematical manipulation.  

But we know if we square then the method tries to avoid large differences between actual and forecast.  If the difference is 10, when we square it it becomes 100.  So one other feature of square is it gives more weight to larger.  

In general, list squared tries to draw a line across a set of dots, such that a square of the difference of dots and line is minimized.  We will go through this on Wednesday.  

Thank you.  

[End of class.]