+ Reply to Thread
Results 1 to 5 of 5

Formula for calculating E(X|X>Y) of Normal Distribution

  1. #1
    Registered User
    Join Date
    02-20-2015
    Location
    Dublin
    MS-Off Ver
    10
    Posts
    1

    Formula for calculating E(X|X>Y) of Normal Distribution

    Would anyone happen to know a formula for calculating the following either in Excel or VBA

    E(X|X>1000)

    The distribution I'm working with is a Normal Distribution (mu , sigma)

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Formula for calculating E(X|X>Y) of Normal Distribution

    I'm not sure if I understand your notation well -
    Are you looking for mean for the part of normal distribution (cut by X=some value)?
    Basically excel offers only built in functions for normal distribution frequency and cumulative frequency, as well as inversed cumulative (i.e. quantiles).
    all the rest has to be derived either from just equations standard solving (or numerical methods for solving - excel is not perfect in that - max floating point precision is double)
    Last edited by Kaper; 02-20-2015 at 09:40 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-06-2014
    Location
    dublin
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Formula for calculating E(X|X>Y) of Normal Distribution

    Thanks for the reply?

    What I am basically trying to do is calculate the expected value between 2 points

    So we have a normal distribution (mu sigma)

    I want to calculate the expected value of that distribution of between a given Y and Z


    So if I have a distribution ( 1000, 500)

    What is the expected value between 4000 and 5000.

    I was thinking I could calculate the expected value above 4000 and then above 5000 and subtract the two?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Formula for calculating E(X|X>Y) of Normal Distribution

    I am not sure what you are trying to calculate. My first guess is that you want the NORMDIST() function https://support.office.com/en-us/art...2-c9ff422d6d58 It is not clear to me if you are looking for the probability density at your given x or the cumulative distribution -- both values can be calculated by NORMDIST(). See if that is what you are looking for.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Formula for calculating E(X|X>Y) of Normal Distribution

    Quote Originally Posted by Peno View Post
    What I am basically trying to do is calculate the expected value between 2 points
    So we have a normal distribution (mu sigma)[.] I want to calculate the expected value of that distribution of between a given Y and Z[.] So if I have a distribution ( 1000, 500)[.] What is the expected value between 4000 and 5000.
    I was thinking I could calculate the expected value above 4000 and then above 5000 and subtract the two?
    Do you really want the probability, not the "expected value" (mean)?

    If we substitute the word "probability" wherever you use "expected value", the procedure you describe calculates the probability of 4000<=X<=5000, which we might describe as P(X | 4000<=X<=5000).

    It is simpler to calculate P(X | X<=5000) - P(X | X<=4000). That is:

    =NORMDIST(5000,1000,500,1) - NORMDIST(4000,1000,500,1)

    However, with mean=1000 and sd=500, 5000 is 8sd = (5000-1000)/500, and 4000 is 6sd = (4000-1000)/500. Those cumulative probabilities are nearly 100%, and their difference is infinitesimal (about 9.87E-10).

    If you are making up example numbers, it might be more interesting to select X such that -3sd <= X <= 3sd, for example. With mean=1000 and sd=500, choose -500 <= X <= 2500.

    [EDIT] If you truly mean "expected value", the result you are looking will be a number between -500 and 2500 (using my limits). Is that what you are indeed looking for?

    [EDIT] PS.... I just realized you posted this in the VBA subforum. Use WorksheetFunction.NormDist in VBA.
    Last edited by joeu2004; 02-21-2015 at 03:03 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Normal Distribution
    By dalai in forum Excel General
    Replies: 1
    Last Post: 08-23-2014, 05:58 PM
  2. Replies: 5
    Last Post: 01-31-2011, 12:21 AM
  3. calculating normal distribution, CDF and PDF
    By Pasha81 in forum Excel General
    Replies: 0
    Last Post: 12-17-2009, 05:51 AM
  4. Normal distribution
    By smaug82 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2008, 02:56 AM
  5. [SOLVED] Normal Distribution?
    By Anthony Slater in forum Excel General
    Replies: 3
    Last Post: 03-08-2005, 04:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1