I was wondering if someone could help me figure out how this function works. My problem is not that I need homework help, it's that I've never done any stats homework! So, I'm absolutely clueless.

My problem is that I've been using the BETADIST function in a Microsoft Excel worksheet, and now I'm creating an application program in another programming language that doesn't have access to the BETADIST function, so I, in essence, need to recreate that function. And, in order to do that, I need to know what it's doing behind the scenes.

So, in Excel, I type in the function "=BETADIST(0.2, 1.57, 2, 0, 1)", and it gives me the value 0.1803. From reading about this function in Excel, the BETADIST function returns the cumulative beta probability density function, and is in the following format:

=BETADIST (x, alpha, beta, lower bound to x, upper bound to x), where, in my example, x = 0.2, alpha = 1.57, beta = 2, lower bound = 0, and upper bound = 1.

So, assuming I have my values of x, alpha, beta, and lower bound is always 0 and upper bound is always 1, how can I derive that value of 0.1803?

I've looked on wikipedia at the formulas, and they are absolute greek to me, so I need a good lesson, if anybody would be willing to give me one. Can anyone help illustrate for me how that BETADIST function derived the value of 0.1803, given x = 0.2, alpha = 1.57, and beta = 2?

Many thanks in advance,

Mark