Results 1 to 5 of 5

Thread: misbehaving log-normal distribution in Excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    7

    misbehaving log-normal distribution in Excel

    Hey all,
    I've set up a lognormal distribution in Excel, to represent my data, but it is not doing what it should, as its peak is not as high as I know it should be. The following formula I obtained from Wikipedia.

    =EXP(-((LN(A5)-$J$5)/$J$6)^2)/A5*$J$5*SQRT(2*PI())

    where J5= mean of the raw data &
    J6 = standard deviatation

    Are there missing parameters that are not accounted for in this formula, and how would I estimate them from my data? I fitted the model to my data in R.

    cheers
    ajmac

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: misbehaving log-normal distribution in Excel

    Perhaps reading this thread may shed some light?

    http://vbforums.com/showthread.php?t=418752
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Wink Re: misbehaving log-normal distribution in Excel

    Ajmac,

    Despite the unfavourable report on EXCEL referred by RobDog888 , I attach an EXCEL file which perhaps will bring some light to your problem (I posted it in a previous thread but here it is one more time).

    Note that the formula you obtained from WIKIPEDIA is the probability density function and a group of brackets is missing in the denominator of the EXCEL coded function.

    It should be: =EXP(-((LN(A5)-$J$5)/$J$6)^2)/(A5*$J$5*SQRT(2*PI()))

    Anyway, I don´t think it is of any use to you, if you are looking to estimate the LogNormal parameters.

    Hope this helps.
    Attached Files Attached Files
    ...este projecto dos Deuses que os homens teimam em arruinar...

  4. #4
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: misbehaving log-normal distribution in Excel

    I think I would add that the link shown on the NPL website does refer specifically to the SAMPLE standard deviation (which is not the same as the population sd) and then at larger values. It does not necessarily imply that all Excel stat analysis is bad. Indeed - if you check the built-in formulae against calculations, you'll by and large find no difference at all.

    Don't let the rumour-mongers put you off, but be sensible and check that the numbers you're getting are what you think they ought to be. You should be doing this in any maths package you use anyway, Excel or otherwise. I do.

    zaza
    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

  5. #5
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: misbehaving log-normal distribution in Excel

    I couldn´t agree more with Zaza´s words reagarding EXCEL. I regret having not stressed it before.

    Rui
    ...este projecto dos Deuses que os homens teimam em arruinar...

Posting Permissions

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



Click Here to Expand Forum to Full Width