Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have one vector of alpha, one vector of beta, and I am trying to find a theta for when the sum of all the estimates (for alpha's i to n and beta's i to n) equals 60.

Basically what I did is start from theta = 0.0001, and iterate through, calculating all these sums, and when it is lower than 60, continue by adding 0.0001 each time, while above 60 means we found the theta.

I found the value theta this way. Problem is, it took me about 60 seconds using Python, to find a theta of 0.456.

What is quicker approach to find this theta (since I would like to apply this for other data)?

share|cite|improve this question
It is very hard to understand what you're asking. Please explain what you're trying to achieve, using standard notation and terminology. – yohBS Mar 18 '13 at 15:21
@yohBS Does this help? – Dualinity Mar 18 '13 at 15:54



You want to find a $\theta$ for which $f(\theta)=0$. This is a common task, and is called root finding. There are numerous ways to achieve that, and python (scipy) has a built in function that does that - fsolve.

share|cite|improve this answer

I used the bisectional method for finding the root.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.