Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8861343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:28:18+00:00 2026-06-14T15:28:18+00:00

I have been looking around for a while on fitting Levy Distributions to a

  • 0

I have been looking around for a while on fitting Levy Distributions to a histogram to no avail. I am hoping to test out how a Levy Flight distribution would look on the data regardless of whether it truly is the right fit for our data type. Since I am rather new at PDFs and fitting my own PDFS aside from the distfittool GUI in matlab, I am a bit unaware of what I need to do to properly do this.

So currently, my data is a 208×1 vector, 208 points represents different speeds for 208 distinct objects. Speeds were calculated just via overall distance per time.

Now, currently I took the function that describes the Levy flight from:
http://reference.wolfram.com/mathematica/ref/LevyDistribution.html (Out[3])

And I used the following code to try it out:

load('Speeds.mat')
modelFun = @(p,x) (exp(-p(1)./(2.*(x-p(2)))).*(p(1)./(x-p(2))).^3/2)./(sqrt(2.*pi).*p(1));
startingVals = [1 1];
coefEsts = nlinfit(LBSpeed,modelFun,startingVals);

I am completely aware that my lack of familiarity with the Levy flight distribution is the root of why I am not even sure whether that is the proper function to use for the distribution, nor the arguments I need to pass to it to properly do this. If anyone could give me a bit more insight, I’d greatly appreciate it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:28:20+00:00Added an answer on June 14, 2026 at 3:28 pm

    I have seen similar questions to this problem with no answers, so after getting help from a colleague I wanted to post the solution

    The other thing that was changed from my original question, is that it became piecewise to better satisfy the reference of the levy flight equation I posted myself. The starting vals I chose were arbitrary.

    load('Speeds.mat')
    [N,X] = hist(Speed,20);
    Y = N/(sum(N))/diff(X(1:2));
    
    %Get best parameters
    modelFun = @(p,x) (x>p(2)).*(exp(-p(1)./(2.*(x-p(2)))).*(p(1)./(x-p(2))).^(3/2))./(sqrt(2.*pi).*p(1));
    startingVals = [1,1];
    coefEsts = nlinfit(X,Y,modelFun, startingVals);
    
    %Visualize fit
    bar(X,Y);
    hold on;
    model_eval = modelFun(coefEsts,X);
    plot(X,model_eval,'r','LineWidth',2);
    

    I wasn’t aware of how to fit histograms in the first place, so hope this helps someone new to this!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking around for quite a while and feel that I have a
I have been looking around for a while, and cant seem to find the
I have been looking around for a while now and I'm not able to
I have been looking around for a while on google but no fruitful results.
I've been looking around for a while, and I have not been able to
I have been looking around for a while and not found anything useful, also
I have been looking around and I cannot seem to figure out how to
I have been looking around online for a while now for methods of integration
I have been looking around for a visualization framework that would aid graph visualization
I have been looking around for solutions, and tried to implement what is often

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.