VBA Express Forum  
Google
 




Go Back   VBA Express Forum > VBA Code & Other Help > Excel Help
     Feedback     
Register FAQ Members Arcade KBase Articles

Reply
 
Thread Tools Display Modes
Old 01-27-2006, 12:02 AM   #1
xxbenxx

 
Joined: Jan 2006
Posts: 4
Kb Entries: 0
Articles: 0
Help needed for plotting charts/graphs

hi to all,

I need to use Excel VBA code to write a code which allows me to plot graphs from input values that I have.

However, the graphs need to be of the following distributions: Weibull, Gamma and Beta.

Anyone can pls advise on how can this be achieved?

Local Time: 05:34 PM
Local Date: 07-30-2010

 
Reply With Quote Top
Old 01-27-2006, 12:43 AM   #2
Ken Puls
Administrator

 
Joined: Aug 2004
Posts: 3,904
Kb Entries: 45
Articles: 0
Hi there, and welcome to VBAX.

Please don't cross post at another forum without providing a link. It is not fair to have multiple experts volunteering their time without knowing that someone else is currently working on, or may have already solved the issue. I'm not saying "don't cross post", I'm just asking you to be corteous enough to post a link.

http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1138337353/0#1



Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.

Learn how to use our KB tags! -||- Ken's Excel Website -||- My Blog

This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!


Local Time: 02:34 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Old 01-27-2006, 12:45 AM   #3
xxbenxx

 
Joined: Jan 2006
Posts: 4
Kb Entries: 0
Articles: 0
I'm sorry.. din know about the rules.. will not do it again

Local Time: 05:34 PM
Local Date: 07-30-2010

 
Reply With Quote Top
Old 09-03-2007, 12:38 PM   #4
Shazam
 
Shazam's Avatar

 
Joined: Sep 2005
Posts: 525
Kb Entries: 0
Articles: 0
Quote:
 
Originally Posted by: xxbenxx
hi to all,

I need to use Excel VBA code to write a code which allows me to plot graphs from input values that I have.

However, the graphs need to be of the following distributions: Weibull, Gamma and Beta.

Anyone can pls advise on how can this be achieved?



I stumbled on this thread and I know it's really old but maybe this could help someone in the near future.

Hi xxbenxx

What you're trying come up with are statistical analysis. These are very complex when trying to determine your variables in your problem. I had a similar project that my boss ask me to do at work. First I'm not a statistician so I'll try my best to explain. I work at a manufacturing plant and my boss ask me what are the time to rate of these machines will fail before 24.00 hours. So I did some research and finding out the WIEBULL is a perfect function for this type of scenario. Before getting your WEIBULL function to work you'll need to get the ALPHA and the BETA and before getting those functions you will need to get the MEAN and SIGMA. The most important of your findings are to have a history of accurate data then we could apply your statistical analysis. Let’s do a small example, List your data in A12:B18.

History of the Hours , Machine Ran until failure

Machine 1 20.23
Machine 1 15.25
Machine 1 12.35
Machine 1 18.25
Machine 1 23.59
Machine 1 24
Machine 1 13.45

To find the MEAN you'll need to take an average in column B
input formula in cell B2.

=AVERAGE(B12:B18)

Then to find the SIGMA you'll need a
standard deviation in column B
input formula in cell B3

=STDEV(B12:B18)

Now here where it gets complex to find the ALPHA you'll need to understand the meaning.

ALPHA is the probability of rejecting the hypothesis tested when that hypothesis is true. In layman’s terms it’s pretty much guessing.

Input formula in cell D2

=B2*SQRT(EXP(GAMMALN(1+2/B3))-EXP(GAMMALN(1+1/B3))^2)


BETA is the probability of accepting the hypothesis tested when the alternative hypothesis is true.

Input formula D3

=B2*EXP(GAMMALN(2+3/B3))

The ALPHA and the BETA results might be off slightly maybe, but if you know how to use solver then you could get the alpha & beta from there.

Now we could apply the WEIBULL formula. Also here is a link that will explain the WEIBULL.

http://www.qualitydigest.com/jan99/html/body_weibull.html

Input formula in cell E8

=1-WEIBULL(24,D2,D3,1)

It will tell you that the machine has a 52.37% fail rate before hitting the 24 hour mark.

If you would like to know the Probability rate that the machine will fail between 10 to 24.00 hrs.

Input formula in cell F8

=WEIBULL(24,D2,D3,TRUE)-WEIBULL(10,D2,D3,TRUE)


Then it will tell you that you have a 45.74% it will fail between 10 to 24 hours.

Hope this helps!



SHAZAM!

Local Time: 04:34 AM
Local Date: 07-30-2010
Location:

 
Reply With Quote Top
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:34 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright @2004 - 2009 VBA Express