New OOTS products from CafePress
New OOTS t-shirts, ornaments, mugs, bags, and more
Results 1 to 10 of 10
  1. - Top - End - #1
    Titan in the Playground
     
    Yora's Avatar

    Join Date
    Apr 2009
    Location
    Germany

    Default Simple Math/Statistics/Economics Question (urgent, though)

    I have an economics exam tomorrow and while going through some training questions I discovered that one equation we've been given always produces implausible results.

    The question is about restocking your supply of a product in a way that makes sure you (almost) never will run out completely before your new order arrives in your stock. I am told to find the number of items in the stock at which I would have to place a new order to restock.

    s = the number of items at which I place a new order.
    t(o) = units of time between placing the order and the items arriving in my stock.
    v = consumption of items during a unit of time.
    e = safety margin in number of items.

    Spoiler: Calculating e
    Show
    I understand this part very well, but in case you wonder where I got that number:

    Average consumption per day is 100
    Standard deviation sigma is 7
    Certainty of not running out is demanded at 97.73%
    A table we've been provided says that for 97.73% certainty, the corresponding factor k = 2

    k * sigma = 2 * 7 = 14

    This means that on 97.73% of days, my consumption will be 100 +/- 14 = 86 to 114


    Here are the values for my question:
    v = 100/day
    t(o) = 2.5 days
    e = 14 (see spoiler above)

    The formula we've been given to calculate the number of items when we place a new order is s = v * t(o) + e

    Enter the numbers: s = 100 * 2.5 + 14 = 264

    264 is the number at which I have to make a new order for more supply.

    Looks good so far, but now I also got a list of consumed items for various days, and that's where it starts looking weird: (consumption and placing an order always at the start of a day.)

    Starting with a stock of 500.

    Day Consumption Stock
    1 -105 395
    2 -93 302
    3 -110 192 (place order!)
    4 -103 89
    5 -106 -17!
    6 -85/+400 183

    I ran out of stock, even though I never exceeded the 114 consumed items per day. That's not supposed to happen. That's why there's a safety margin included. I have another question with different numbers that runs into the same problem. Over the first five days, my average consumption was only 103.4. That should not be an event with only a 2.28% risk of happening?

    Did I make an error?
    Is e somehow too small?
    Does it make sense to calculate with 2.5 day for delivery if my unit of time for consumption is 1 day?
    We are not standing on the shoulders of giants, but on very tall tower of other dwarves.

    Spriggan's Den Heroic Fantasy Roleplaying

  2. - Top - End - #2
    Firbolg in the Playground
    Join Date
    Dec 2010

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    How is t(o) not an integer number of days if placing orders, consumption, and new items arriving all occur at the start of a day? 2.5 days would have had the +400 happen halfway through day 5, not at the start of day 6, which would have been fine, no?

    It looks like your simulation worked as if t(o) was 3 days, not 2.5. Which would have had you placing the order at day 2 rather than day 3, and you would have been okay.
    Last edited by NichG; 2020-06-25 at 07:26 AM.

  3. - Top - End - #3
    Dwarf in the Playground
     
    Imp

    Join Date
    Jan 2019

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    Your granularity is 1 day, so 2.5 days doesn't make sense in your model. Set it to a multiple of your granule size; in this case 3.

    That gives you a threshold a bit over 300, so the order should have occurred the day before.



    Oh, right. You also need to work out what the deviation is Over 3 days. There are 2 ways of approaching this, depending on whether your table is arranged or not. We either assume days are independent, or not. If your table is arranged chronologically you need to build a table of 3 day blocks (overlapping), and then do your statistics on those blocks. Otherwise we have to treat days as independent*, and use the summing distribution rules, which also produces a larger safety margin than the 14 you use. It would be root 3 times this.


    Think about it this way, we want to ask: at what value are we 97% sure we will not exceed sales over 3 days. We need to build a distribution that reflects sales over 3 days. Sales over multiple days are the sum of sales on each of those days, so we need to use our formulae for summing distributions to get the distribution we want.

    * This is the sort of unsafe assumption that gets real world statistics into trouble. Comparing the two methods would be how we would test the question "are days independent of each other in terms of sales?", or "can we make predictions on a days sales based on the 2 previous days".

    So to answer your questions: Yes, Yes; it should be 13, and Yes you should be using 3. Hope that helps, and good luck!
    Last edited by Fat Rooster; 2020-06-25 at 08:16 AM.

  4. - Top - End - #4
    Titan in the Playground
     
    Yora's Avatar

    Join Date
    Apr 2009
    Location
    Germany

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    This is the single economics class for horticulture students. The professor kept it wisely fairly simple.
    Fortunately for me, I actually did two semesters in economics with two statistics classes years ago, which makes all this stuff really basic and simple.

    I think the idea behind having delivery times of half an hour or 2.5 days is to avoid confusion when consumption and restocking happens simultaneously.
    If an order is placed at 9:00, the new items will be ready for consumption at 10:00.
    And in the previous example, if new items are ordered on the morning of day 3, they will be delivered in the afternoon of day 5, available for consumption at the morning of day 6.

    Since consumption can only happen in the morning or at the start of a full hour, I think we have to round up t(o) to the next full unit of time. Otherwise it just doesn't make any sense.

    --

    The phrasing with which some of the factors are described in my documents are a bit unclear, and I probably won't get a reply to an email to the professor today. But maybe you can help me figure out what this means.

    The general idea is that you can check s any time you take from the stock or at fixed time intervals t(c).
    You can also always order the same amount r, or order the amount needed to get the stock to amount S.

    s: Stock quantity at which a new order is placed. [Item Units]
    S: Targeted stock quantity when placing an order. [Item Units]
    r: Fixed quantity for each order. [Item Units]
    t(order): Time duration between noting that s has been reached and the arrival of new items in the stock. [Time Units]
    t(control): Fixed time duration between manual checks of the stock quantity. [Time Units]
    v: average consumption per unit of time during the ordering duration. [Item Units/Time Units]
    e: Safety stock quantity. [Time Units]

    Ordering Level System: s = v * t(o) + e
    Control Interval System: s = v * [ t(o) + t(c) ] + e

    Safety stock quantity: e = k * sigma
    (k is read off a table for a given acceptable risk of running out)

    Spoiler: Question 25: Restocking Policy
    Show

    A product that is on average consumed by 10 units per hour gets an (s,S)-Strategy policy. Consumption varies with a standard deviation of 2.

    Time to order and resupply is half an hour, each time the stock is raised back to 20 units.

    The department leader accepts a risk of running out of 0,62%. (This means alpha service level of 99,38%, which means a safety factor k of 2.5.)

    a) Calculate the Safety stock quantity e and the "place new order quantity" s.

    b) Show the development of the stock quantity at a starting quantity of 20 units. Work begins at 6:30 and ends at 14:30. Time duration to order and receive new units is 30 minutes. The following quantities are being consumed from the stock.

    Time Consumption
    7:00 9
    8:00 13
    9:00 8
    10:00 10
    11:00 13
    12:00 7
    13:00 10
    14:00 10


    So in this example we check the stock every time we consume units, and if the amount is equal or lower than s, we place an order for quantity S.

    a)

    e = k * sigma = 2.5 * 2 = 5

    s = v * t(o) + e = 10 * 1 +5 = 15

    b)

    Time Consumption Stock Order
    6:30 - 20 -
    7:00 -9 11 placed
    7:30 - 20 +9
    8:00 13 7 placed
    8:30 - 20 +13
    9:00 8 12 placed
    9:30 - 20 +8

    Having an s value of 15 means that I will always put a new order if I consume 5 or more items in one hour. It seems really unlikely that I would only consume 4 items in one hour. My intuition tells me that this feels way over-cautious. To get a shortage I would have to consume 4 units in the first hour and 17 units in the second hour.
    But then, the demanded reliability is 99.87%. Could this actually be correct?

    If I don't round up, then s = 10. That means if my stock is 11 or 12, I would not put a new order. The chance that I will consume 12 or more items per hour is quite high, so there's no way that this would be a 99.87% reliability.

    One other option would be to chance my unit of time to half hours so that v = 10/h is the same as v = 5/0.5h. But I think that would be a gross statistical error. I am pretty sure you're not allowed to do that.
    It also would make everything needlessly more complicated.

    I'll try asking some other students about this before the exam tomorrow, but I feel pretty certain that t(o) has to be rounded up. Otherwise it just looks nonsensical.
    We are not standing on the shoulders of giants, but on very tall tower of other dwarves.

    Spriggan's Den Heroic Fantasy Roleplaying

  5. - Top - End - #5
    Dwarf in the Playground
     
    Imp

    Join Date
    Jan 2019

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    On rereading your post I assume by table you don't mean data table? As in, you are given the statistics themselves, rather than a raw list of data that you have to derive statistics on?


    Probably just ignore the bit about blocks of 3. They probably just want you to assume days are independent, and add the distributions with that in mind, which means that new sigma squared is the sum of old sigma squared; and you have to consider 3 days of distributions.


    Ignore this, clarified as I was posting.
    Last edited by Fat Rooster; 2020-06-25 at 09:39 AM.

  6. - Top - End - #6
    Titan in the Playground
     
    Yora's Avatar

    Join Date
    Apr 2009
    Location
    Germany

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    No, we are given a little cheat sheet for the problem that looks like this:

    alpha Service Level Safety factor k
    50.00% 0.0
    84.13% 1.0
    93.31% 1.5
    97.72% 2

    You want 97.72% certainty that there won't be any shortages, then your value for k is 2.

    Put that into the formula e = k * sigma, with sigma being the standard deviation that is listed in the problem.

    At least that's what we've been given in our documents. I've seen other formulas that look way longer and crazier.
    We are not standing on the shoulders of giants, but on very tall tower of other dwarves.

    Spriggan's Den Heroic Fantasy Roleplaying

  7. - Top - End - #7
    Dwarf in the Playground
     
    Imp

    Join Date
    Jan 2019

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    Ah, ok. The idea is that our model operates on a much finer grain than the data we are presented with suggests.

    The question we need to ask is "what does the distribution of use look like for a period of time between an order being placed, and delivered. ie: 1 1/2 hours in your example. We are not given this though. We are given a table of uses in 1 hour intervals. We need to make a guess at what the 1 1/2 hour distribution looks like from our sampling based on 1 hour intervals. Obviously the average should be 1.5x bigger, but we also need to figure out the sigma on a 1 1/2 hour interval. To get that we have to multiply the sigma of 1 hour (which we can calculate from the table) by the square root of 1.5.

    There are some implicit assumptions of randomness here, but we will gloss over them.

    Edit: Ok, so the restock time is 1/2 an hour, not the hour and a half I first read... Multiply the sigma be root .5 to get the sigma on a half our time slot.

    Spoiler: If you don't want to gloss over
    Show
    Looking at the 'half day' example, you can see why sampling every day might give you a strange result in a 2.5 day delivery. If you everything in the morning than the evening it would not show up in your daily statistics, but 2.5 days might as well be 3 in terms of deliveries. If you only consume in the morning then you get the same result as treating it as 2 days. Your sampling loses some structure that affects your deliveries, making statistical guarantees tricky. There is less reason to assume that the top half of the hour is different from the bottom half though, so probably not a problem in this case.

    After the edit though, hourly sampling might be missing some grouping on the 1/2 hour time scale, which can mess with things.
    Last edited by Fat Rooster; 2020-06-25 at 09:54 AM.

  8. - Top - End - #8
    Dwarf in the Playground
     
    Imp

    Join Date
    Jan 2019

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    Ok, I think I get the question now. The (s,S) strategy refers to the fact that stock is checked every time it is withdrawn, and an order is placed to bring it to 20 if there is less than some threshold amount. That threshold amount is set so that there is set percentage (2.5 sigma in this case) that stock will be exhausted in the time it takes for an order to arrive. To understand this we need to work out what the distribution of use looks like in that 30 min time window. Sigma for an hour is 2, so sigma for a half hour is ~1.414 (2 * square root of .5)*. Average is obviously 5.

    Our order point is then average use in time an order take (5) plus our k value times sigma, (2.5*1.414), or 8.something. We need to round up for our statistics to be better, so we go with ordering at 9. This assumes independence of half hours though, so they might want you to go with an upper bound to sigma for the half hour, for which 2 is reasonable.

    I get either 9 or 10 for the order point, depending on whether we are prepared to live dangerously in assuming independence.


    For part B I have no idea what it wants you to do. You will get orders at some times between the hours, but assessing whether a delivery occurs before or after a particular unit is consumed is impossible...
    Last edited by Fat Rooster; 2020-06-25 at 10:33 AM.

  9. - Top - End - #9
    Titan in the Playground
     
    Yora's Avatar

    Join Date
    Apr 2009
    Location
    Germany

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    Given that this is by far the most complex math in the whole class and the scarcity of formulas that are provided for this problem, and also considering the overall depth the whole class goes into, I am very sure that we're not asked to make such mental transformations to figure out how to recalculate the sigma for a half hour.

    While I'm still not convinced that we're supposed to just round up the resupply period to a full number and there could be a better answer, at this point I just don't have the time to spend more time on this one problem. Better practice the other 34 things we need to know for the exam tomorrow.

    But still thanks for the help. At least I know that I'm not just dumb to not understand the instructions that were provided.
    We are not standing on the shoulders of giants, but on very tall tower of other dwarves.

    Spriggan's Den Heroic Fantasy Roleplaying

  10. - Top - End - #10
    Titan in the Playground
     
    Knaight's Avatar

    Join Date
    Aug 2008

    Default Re: Simple Math/Statistics/Economics Question (urgent, though)

    Quote Originally Posted by Yora View Post
    Here are the values for my question:
    v = 100/day
    t(o) = 2.5 days
    e = 14 (see spoiler above)

    The formula we've been given to calculate the number of items when we place a new order is s = v * t(o) + e

    Enter the numbers: s = 100 * 2.5 + 14 = 264

    264 is the number at which I have to make a new order for more supply.

    ...

    Day Consumption Stock
    1 -105 395
    2 -93 302
    3 -110 192 (place order!)
    4 -103 89
    5 -106 -17!
    6 -85/+400 183

    I ran out of stock, even though I never exceeded the 114 consumed items per day. That's not supposed to happen. That's why there's a safety margin included. I have another question with different numbers that runs into the same problem. Over the first five days, my average consumption was only 103.4. That should not be an event with only a 2.28% risk of happening?
    Keeping in mind that this is not remotely my field and as such I'm just working with your information I see a few notes.

    The big one is that the order is placed at the start of day 3 and not mid way through day 2 - but clearly the 264 threshold was crossed during day 2. That -17 figure meanwhile would be the end of day 5. If we instead assume the shipment shows up during day 5 it's potentially fine, especially as doing some quick interpolation shows that you'd expect to hit on day 2.35 and resupply to thus show up on day 4.85. A little more interpolation indicates that at day 4.85 you expect to have -0.6 items remaining, which while technically negative is pretty consistent with JIT resupply.

    The function presented doesn't seem to take account of this being a discrete function instead of a continuous one (though that might be in your calculation for e).

    Out of curiosity, are you 100 percent sure your formula isn't s = v * (t(o) + e)? Because that would solve all of this.
    Last edited by Knaight; 2020-08-03 at 02:57 AM.
    I would really like to see a game made by Obryn, Kurald Galain, and Knaight from these forums.

    I'm not joking one bit. I would buy the hell out of that.
    -- ChubbyRain

    Current Design Project: Legacy, a game of masters and apprentices for two players and a GM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •