Results 1 to 2 of 2

Math Help - Weibull distribution and modified maximum likelihood theory

  1. #1
    Newbie
    Joined
    Mar 2012
    From
    Belfast
    Posts
    2

    Question Weibull distribution and modified maximum likelihood theory

    I'm trying to make use of the weibull distribution function to find the spread of wind speeds for my dissertation project.I am also using the modified maximum likelihood theory to find the values for the scale and shape parameters.

    The equations I have for each are as follows:
    Weibull distribution and modified maximum likelihood theory-.png

    where k is the shape parameter and c the scale parameterI have constructed a script in MATLAB in order to try solve this with the wind speed data I have but for some reason I just cant seem to get the right values.Can anyone see where I may be going wrong?

    Code:
    data = xlsread('1.xlsx', 1, 'A2:A8076');
    [P,V]=hist(data);k=2;q=[1:10];
    A=sum((V(:,q).^k).*log(V(:,q)).*P(:,q));
    B=sum((V(:,q).^k).*P(:,q));
    C=sum((log(V(:,q))).*P(:,q));
    D=sum(data>=0);
    while any(k-(((A/B)-(C/D))^-1))^2)>0.000001    
    k=k-0.0000001;
    end
    format('long')
    k
    c = (((1/sum(data~=0))*(sum((V(:,q).^1.5)))))^(1/1.5)
    end
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Mar 2012
    From
    Belfast
    Posts
    2

    Re: Weibull distribution and modified maximum likelihood theory

    managed to find the solution, just to save anyone wasted time looking in to it

    Code:
    data = xlsread('1.xlsx', 1, 'A2:A8076');
    [P,V]=hist(data);
    k=1.32;
    q=[1:10];
    A=sum((V(:,q).^k).*log(V(:,q)).*P(:,q));
    B=sum((V(:,q).^k).*P(:,q));
    C=sum((log(V(:,q))).*P(:,q));
    D=sum(data>=0);
    K=(((A/B)-(C/D))^-1);
    while abs((K-k)^2)>0.0000000001
        k=k+0.00000000001;
    end
    format('short')
    k
    c=((1/D)*B)^(1/k)
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Weibull distribution
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: April 17th 2013, 02:05 AM
  2. Replies: 0
    Last Post: March 6th 2011, 03:40 PM
  3. maximum(modified)
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: December 9th 2010, 08:50 AM
  4. Replies: 1
    Last Post: November 23rd 2010, 03:20 AM
  5. Replies: 1
    Last Post: October 21st 2009, 03:57 AM

Search Tags


/mathhelpforum @mathhelpforum