Results 1 to 5 of 5

Math Help - Plotting deviation from mean

  1. #1
    Newbie
    Joined
    Dec 2008
    From
    Auckland
    Posts
    8

    Plotting deviation from mean

    Hi,
    Hoping to get some insight into how to plot variance to mean along with graphing the normal distribution.
    Please excuse the clumsy definitions/descriptions.

    I have three mumbers which I'm hoping to be able to use to graph a normal distribution

    Mean = 87.85
    Std.Dev = 8.38
    Entire sample size = 10,000,000,000

    The other thing I need to do is understand the expected deviation from mean after X number of results, which might be as little as 5% of the Entire sample needed to establish the mean....

    Any guidance appreciated
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Pim
    Pim is offline
    Member
    Joined
    Dec 2008
    From
    The Netherlands
    Posts
    91
    I do not get your first question, could you give some further explanation on what you want to do with it? On the other hand the second one is a bit weird. The mean is the expected value, therefore you do not expect any deviation from the mean. However, you can determine the number of trials for which you are almost certain that you find the mean. If that is what you were looking for, tell me and I'll try to help you.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2008
    From
    Auckland
    Posts
    8
    Quote Originally Posted by Pim View Post
    I do not get your first question, could you give some further explanation on what you want to do with it? On the other hand the second one is a bit weird. The mean is the expected value, therefore you do not expect any deviation from the mean. However, you can determine the number of trials for which you are almost certain that you find the mean. If that is what you were looking for, tell me and I'll try to help you.
    Well, The two 'questions' go hand in hand.

    What I want to use it for... I work in the gamng industry and while I understand that gaming machines cannot be expected to perform to mean over a small(ish) sample of results I'm hoping to be able to establish just how much of a deviance from the mean is within reason (follows normal distribution).
    Many modern gaming machines have a 'cycle' (# of unique results) of more than 10,000,000 and have a mean of between 87% and 97% and a standard deviation of less than 15. Results at 68% of the cycle fall within (+/-) 5% on the mean.
    This is all good.
    But when I need to prove that the results after say 50,000 events are within the expected range of variance I come unstuck - can't do the math (don't even know where to start).
    So, as a starting point I have three things:
    • Number of unique results (cycle)
    • Mean (of complete cylce)
    • Standard deviation
    I'm hoping to be able to plot the distribution (and result of for question 2) on a graph to illustrate to other math bumblers like me.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Pim
    Pim is offline
    Member
    Joined
    Dec 2008
    From
    The Netherlands
    Posts
    91
    The problem with statistics is that you cannot exactly prove something, seeing as there are random numbers in it. However, you can say with say 99% certainity that your sample has the same mean as the whole population.

    To calculate this you need the standardized normal distribution and the table that goes with it. Now say that you would like to establish with 99% certainity that your population mean is within 0.01 of the sample mean you'll get from the testing.

    <br />
\overline{X} \pm z_{c} \frac{\sigma}{\sqrt{n}}<br />

    This formula can help you with that.
    You know the mean and standard deviation, you know your wanted confidence level ( z_{c}) which for 99% matches with 2.58 so you can calculate the amount of trials you will need.

     <br />
z_{c} \frac{\sigma}{\sqrt{n}}= 0.01 <br />

     <br />
2.58 \frac{8.38}{\sqrt{n}} = 0.01<br />

     <br />
\frac{21.6204}{\sqrt{n}} = 0.01<br />

     <br />
\frac{21.6204}{0.01} = \sqrt{n}<br />

     <br />
\sqrt{n} = 2162.04<br />

    n = 2162.04^2

     <br />
n = 4674416.962<br />

    Now this is a rather lot more than the 50,000 you were hoping for.

    If you'd use 50,000 samples you will get the following. (99% certainity)

     <br />
= z_{c} \frac{\sigma}{\sqrt{n}}

    = 2.58 \frac{8.38}{\sqrt{50000}} = 0.096689

    Which comes down to

     <br />
\overline{X} \pm 0.096689 <br />

    If you would do 50,000 trials, you can say with 99% certainity that the mean of the game is within 0.096689 of the sample mean you get.

    Now, there is a similar thing for the standard devation:

    <br />
\frac{\hat{S}\sqrt{n-1}}{\chi_{0.995}} \leq \sigma \leq \frac{\hat{S}\sqrt{n-1}}{\chi_{0.005}} <br />

    To get  \chi_{0.995} and  \chi_{0.005}
    we can use the fact that  \sqrt{2 \chi^2} - \sqrt{2v-1} closely approximates the normal distribution with mean 0 and variance 1. (Standardized normal distribution)
     <br />
\chi^2_{0.995} = 0.5(z_{0.995} + \sqrt{2v -1})^2<br />

     <br />
\chi^2_{0.995} = 0.5(2.85 + \sqrt{2(49999)-1})^2 = 50903.797<br />

    <br />
\chi_{0.995} = \sqrt{50903.797} = 225.619<br />

     <br />
\chi^2_{0.005} = 0.5(z_{0.005} + \sqrt{2v -1})^2<br />

     <br />
\chi^2_{0.005} = 0.5(-2.85 + \sqrt{2(49999)-1})^2 = 49101.326<br />

    <br />
\chi_{0.005} = \sqrt{49101.326} = 221.588<br />

    <br />
\frac{\hat{S}\sqrt{49999}}{225.619} \leq \sigma \leq \frac{\hat{S}\sqrt{49999}}{221.588} <br />

     <br />
\hat{S} 0.99107 \leq \sigma \leq \hat{S} 1.00910<br />

    If you plug your obtained sample standard deviation in this formula, you can say with 99% certainity that your actual standard deviation is within these boundaries.

    You can plot the distribution by using the normal distribution density function, where you can plug in the mean and standard deviation. (Normal distribution - Wikipedia, the free encyclopedia) For the answer on question 2, you could plot your certainity, by plotting a standardized normal distribution (as that is how I approximated it.) Where you color the parts from -2.85 to 2.85.

    I hope this answers your question!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Dec 2008
    From
    Auckland
    Posts
    8

    Thanks!!!

    Pim,
    Thanks for spending the time to put the equations together.
    Quite a bit over my head unfortunately.
    I'll glean what I can from Wikipedia.

    Again, many thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Plotting graphs in C[a,b]
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: December 7th 2011, 03:33 PM
  2. Plotting a point.
    Posted in the Algebra Forum
    Replies: 6
    Last Post: October 17th 2010, 02:52 PM
  3. Plotting
    Posted in the Algebra Forum
    Replies: 1
    Last Post: June 18th 2009, 06:58 PM
  4. Plotting graphs
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: March 23rd 2008, 05:51 PM
  5. standard deviation and mean deviation
    Posted in the Statistics Forum
    Replies: 1
    Last Post: March 16th 2008, 06:09 AM

Search Tags


/mathhelpforum @mathhelpforum