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

which is x and which is y? #111

Open
EthanRLeonard opened this issue Mar 5, 2023 · 0 comments
Open

which is x and which is y? #111

EthanRLeonard opened this issue Mar 5, 2023 · 0 comments

Comments

@EthanRLeonard
Copy link

EthanRLeonard commented Mar 5, 2023

Hey, love this package, and want to make sure I'm understanding how it works.

For a bivariate kernel density, if you sum down a column, then multiply by the x step distance, does that equal the marginal probability of the x variable taking that sliver of range? For example:

$chf,eur \in R^n$

B1 = kde((chf,eur))

x_step = B1.x[2]-B1.x[2]

marginal_probability_1 = sum(B1.density[:,1] .* x_step)

Is the following statement true?

$$ \text{marginal probability 1}= P(X[1] \leq X \leq X[2]) $$

Or should I be using y_step to calculate marginal probability 1?

Sorry for the (maybe too simplistic) question. I appreciate any help you're willing to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant