School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,138 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,818 people online right now. Registration is fast and FREE... Join Now!




Need ideas to solve this problem

 

Need ideas to solve this problem, Integration of a function

radamanthys

30 Oct, 2009 - 05:41 PM
Post #1

New D.I.C Head
*

Joined: 30 Oct, 2009
Posts: 1

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.

User is offlineProfile CardPM
+Quote Post


cfoley

RE: Need Ideas To Solve This Problem

3 Nov, 2009 - 04:03 AM
Post #2

D.I.C Addict
Group Icon

Joined: 11 Dec, 2007
Posts: 660



Thanked: 63 times
Dream Kudos: 25
My Contributions
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.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:13PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month