Should I Normalize My Discretized Integral?

  • Context: Graduate 
  • Thread starter Thread starter pamparana
  • Start date Start date
  • Tags Tags
    Integral
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
pamparana
Messages
123
Reaction score
0
Hello everyone,

I have an integral as follows:

[itex]\log(\int_{r}^{\inf}\frac{P(v,f)}{P(f)}dv)[/itex]

Now, I want to evaluate this on the computer where this PDF represented by P(v, f) is build up using a joint histogram where each entry is a probability for a given value pair for v and f to occur together.

Now when I compute this integral I do it as follows:
[itex]\sum_{r}^{bins}\frac{P(v,f)}{P(f)}[/itex]

where v and f are some appropriate values and bins are the number of bins along the appropriate axes in my joint histogram. Then after accumulation, I take the log of the final value.

Now, my question is that do I need to normalize this somehow? When discretizing such integrals does one normalize it by the range of the definite integral parameters?

Thanks,

Luca
 
Last edited:
Physics news on Phys.org
You're missing a term.

As @fresh_42 says, you appear to be doing a Riemann sum, approximating ##\int_a^b f(x) dx## by ##\sum_{i=1}^n f(x_i) \Delta x ## = ##\Delta x \sum_{i=1}^n f(x_i)## if all the bins are the same size. So you need the ##\Delta x##.