Need ideas to solve this problem

Integration of a function

Page 1 of 1

1 Replies - 1175 Views - Last Post: 03 November 2009 - 05:03 AM

#1 radamanthys   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 30-October 09

Need ideas to solve this problem

Posted 30 October 2009 - 06:41 PM

Hi, well before I describe my problem I'd like to say first I'm not looking for a solution in code, I'm in the Planning stage of my process and I need some ideas as to how to understand and tackle this problem before I go to design a concrete solution.

My last assignment was basically finding the area 'p' below the curve of the t distribution function, given an 'x' that was the upper limit of the integral (which went from 0 to x) and a degree of freedom. I got this part successfully.

Now my current assignment is, given "p" and a degree of freedom, I have to find the 'x'. Basically the same thing but backwards.

The instructor recommends to use trial values for x and use the product of the previous assignment to calculate p with the trial value and see if they match or adjust it if they don't but this is the part that I don't understand. I thought of making a bunch of loops that would increase the decimals or reduce them but I'm pretty sure there are better ways to do it and learn from them. Any ideas or tips? Thank you for your posts in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: Need ideas to solve this problem

#2 cfoley   User is offline

  • Cabbage
  • member icon

Reputation: 2425
  • View blog
  • Posts: 5,068
  • Joined: 11-December 07

Re: Need ideas to solve this problem

Posted 03 November 2009 - 05:03 AM

Have you heard of Newton's method? You make a guess for x that's deliberately too big and one that's deliberately too low. Then you take the midpoint which then either becomes the upper or lower bound. Keep going till your result is accurate enough.

There are improved algorithms but they mostly (all?) work off this principle.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1