Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] explicit/analytic form of energy function for log-normal distribution #219

Open
fkiraly opened this issue Mar 24, 2024 · 5 comments
Open
Labels
implementing algorithms Implementing algorithms, estimators, objects native to skpro math&theory mathematical derivations, theory development module:probability&simulation probability distributions and simulators

Comments

@fkiraly
Copy link
Collaborator

fkiraly commented Mar 24, 2024

There does not seem to exist a literature reference for the energy functionals of the log-normal distribution, we should try to derive it, or find a reference.

Collecting discussion below, from #214.

Current state:

  • explicit formula for the cross-term $\mathbb{E}[|X-c|]$ (almost) derived
  • no progress yet on the self-term $\mathbb{E}[|X-X'|]$

@bhavikar04 used Wolfram Alpha to derive the following indefinite integral related to the cross-term $\mathbb{E}[X-c]$:
Screenshot 2024-03-23 130300

My reply:
this looks correct. Now you need to add the limits. That should be an easy substitution, no? I recommend, do that manually. Use that

$\lim_{x\rightarrow -\infty} \mbox{erf}(x) = -1$, and $\lim_{x\rightarrow \infty} \mbox{erf}(x) = 1$. You need to be careful with the sign, but that should be it?

The number 0.707 etc should be $\frac{1}{2} \sqrt{2}$, but it doesn't matter for the limits.

@fkiraly fkiraly added feature request New feature or request module:probability&simulation probability distributions and simulators implementing algorithms Implementing algorithms, estimators, objects native to skpro labels Mar 24, 2024
@fkiraly fkiraly added math&theory mathematical derivations, theory development and removed feature request New feature or request labels Mar 24, 2024
@bhavikar04
Copy link
Contributor

For the cross-Energy, when using limits x=0--->inf, it seems to evaluate to 0 except when c=0.

@fkiraly
Copy link
Collaborator Author

fkiraly commented Mar 26, 2024

For the cross-Energy, when using limits x=0--->inf, it seems to evaluate to 0 except when c=0.

That cannot be, you must be making an error of sign or similar...

There exists no distribution for which the cross-term is almost always 0.

@bhavikar04
Copy link
Contributor

For the cross-Energy, when using limits x=0--->inf, it seems to evaluate to 0 except when c=0.

That cannot be, you must be making an error of sign or similar...

There exists no distribution for which the cross-term is almost always 0.

same thoughts but rechecking gives me the same answer, to confirm: as x-->inf erf functions in the expression become -1 because of the (-logx) term and similarly become 1 when x-->0, right?

@fkiraly
Copy link
Collaborator Author

fkiraly commented Mar 26, 2024

yes, but the sgn at the start also flips, cancelling these out. So you get a factor of 2, not a factor of 0.

(what bothers me is that cancellation seems to occur for $c<0$ still, which does not seem right, but this should deal with $c>0$)

update, sorry, I think I'm wrong above. The sign swaps thrice:

  • once for the bound
  • once for 0 vs $\infty$
  • once for the sgn

So it cancels to zero?

That cannot be right.

@fkiraly
Copy link
Collaborator Author

fkiraly commented Mar 26, 2024

There might be sth going on with the wolfram heuristic being buggy. What is that strange "plus zero" in the sign function?

I would suggest taking the Wolfram guess and computing its derivative. Then see what matches up or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementing algorithms Implementing algorithms, estimators, objects native to skpro math&theory mathematical derivations, theory development module:probability&simulation probability distributions and simulators
Projects
None yet
Development

No branches or pull requests

2 participants