{"action":"created","issue":{"url":"https://api.github.com/repos/aimalz/qp/issues/34","repository_url":"https://api.github.com/repos/aimalz/qp","labels_url":"https://api.github.com/repos/aimalz/qp/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/aimalz/qp/issues/34/comments","events_url":"https://api.github.com/repos/aimalz/qp/issues/34/events","html_url":"https://github.com/aimalz/qp/issues/34","id":194109040,"number":34,"title":"Add to the KLD notebook derivations of Gaussian behavior","user":{"login":"aimalz","id":8606810,"avatar_url":"https://avatars.githubusercontent.com/u/8606810?v=3","gravatar_id":"","url":"https://api.github.com/users/aimalz","html_url":"https://github.com/aimalz","followers_url":"https://api.github.com/users/aimalz/followers","following_url":"https://api.github.com/users/aimalz/following{/other_user}","gists_url":"https://api.github.com/users/aimalz/gists{/gist_id}","starred_url":"https://api.github.com/users/aimalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aimalz/subscriptions","organizations_url":"https://api.github.com/users/aimalz/orgs","repos_url":"https://api.github.com/users/aimalz/repos","events_url":"https://api.github.com/users/aimalz/events{/privacy}","received_events_url":"https://api.github.com/users/aimalz/received_events","type":"User","site_admin":false},"labels":[{"id":482393505,"url":"https://api.github.com/repos/aimalz/qp/labels/Epic:%20Quantile%20Approximation","name":"Epic: Quantile Approximation","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"aimalz","id":8606810,"avatar_url":"https://avatars.githubusercontent.com/u/8606810?v=3","gravatar_id":"","url":"https://api.github.com/users/aimalz","html_url":"https://github.com/aimalz","followers_url":"https://api.github.com/users/aimalz/followers","following_url":"https://api.github.com/users/aimalz/following{/other_user}","gists_url":"https://api.github.com/users/aimalz/gists{/gist_id}","starred_url":"https://api.github.com/users/aimalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aimalz/subscriptions","organizations_url":"https://api.github.com/users/aimalz/orgs","repos_url":"https://api.github.com/users/aimalz/repos","events_url":"https://api.github.com/users/aimalz/events{/privacy}","received_events_url":"https://api.github.com/users/aimalz/received_events","type":"User","site_admin":false},"assignees":[{"login":"aimalz","id":8606810,"avatar_url":"https://avatars.githubusercontent.com/u/8606810?v=3","gravatar_id":"","url":"https://api.github.com/users/aimalz","html_url":"https://github.com/aimalz","followers_url":"https://api.github.com/users/aimalz/followers","following_url":"https://api.github.com/users/aimalz/following{/other_user}","gists_url":"https://api.github.com/users/aimalz/gists{/gist_id}","starred_url":"https://api.github.com/users/aimalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aimalz/subscriptions","organizations_url":"https://api.github.com/users/aimalz/orgs","repos_url":"https://api.github.com/users/aimalz/repos","events_url":"https://api.github.com/users/aimalz/events{/privacy}","received_events_url":"https://api.github.com/users/aimalz/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aimalz/qp/milestones/1","html_url":"https://github.com/aimalz/qp/milestones/Launch","labels_url":"https://api.github.com/repos/aimalz/qp/milestones/1/labels","id":2137847,"number":1,"title":"Launch","description":"pip-installable, fully tested and integrated package with release 1.0","creator":{"login":"aimalz","id":8606810,"avatar_url":"https://avatars.githubusercontent.com/u/8606810?v=3","gravatar_id":"","url":"https://api.github.com/users/aimalz","html_url":"https://github.com/aimalz","followers_url":"https://api.github.com/users/aimalz/followers","following_url":"https://api.github.com/users/aimalz/following{/other_user}","gists_url":"https://api.github.com/users/aimalz/gists{/gist_id}","starred_url":"https://api.github.com/users/aimalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aimalz/subscriptions","organizations_url":"https://api.github.com/users/aimalz/orgs","repos_url":"https://api.github.com/users/aimalz/repos","events_url":"https://api.github.com/users/aimalz/events{/privacy}","received_events_url":"https://api.github.com/users/aimalz/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":18,"state":"open","created_at":"2016-11-15T22:22:14Z","updated_at":"2016-12-07T18:53:07Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"comments":0,"created_at":"2016-12-07T17:10:38Z","updated_at":"2016-12-07T19:25:41Z","closed_at":null,"body":"This is a continuation of @drphilmarshall's suggestion in #30."},"comment":{"url":"https://api.github.com/repos/aimalz/qp/issues/comments/265546490","html_url":"https://github.com/aimalz/qp/issues/34#issuecomment-265546490","issue_url":"https://api.github.com/repos/aimalz/qp/issues/34","id":265546490,"user":{"login":"drphilmarshall","id":710903,"avatar_url":"https://avatars.githubusercontent.com/u/710903?v=3","gravatar_id":"","url":"https://api.github.com/users/drphilmarshall","html_url":"https://github.com/drphilmarshall","followers_url":"https://api.github.com/users/drphilmarshall/followers","following_url":"https://api.github.com/users/drphilmarshall/following{/other_user}","gists_url":"https://api.github.com/users/drphilmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/drphilmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drphilmarshall/subscriptions","organizations_url":"https://api.github.com/users/drphilmarshall/orgs","repos_url":"https://api.github.com/users/drphilmarshall/repos","events_url":"https://api.github.com/users/drphilmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/drphilmarshall/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T19:25:41Z","updated_at":"2016-12-07T19:25:41Z","body":"Let's add this to `kld.ipynb`.\r\n\r\n@aimalz You pointed me to [this webpage](http://stats.stackexchange.com/questions/7440/kl-divergence-between-two-univariate-gaussians) - looking at this, it turns out my algebra was not very far off at all! With a bit more re-arranging I think you should be able to make a link to the precision ratio $\\sigma/\\sigma_0$ and tension parameter. \r\n\r\nTo whit: note that \r\n\r\n$ \\sigma_2^2 = \\frac{ \\left(  \\sigma_1^2 +  \\sigma_2^2 \\right) }{ \\sigma_1^2 \\left( \\frac{1}{\\sigma_1^2} +  \\frac{1}{\\sigma_2^2} \\right)}$\r\n\r\nThis should leave you with an expression that includes a term \r\n\r\n$ \\frac{1}{2} \\left( 1 + \\frac{\\sigma_1^2}{\\sigma_2^2} \\right) \\frac{\\left( \\mu_1 - \\mu_2 \\right)^2}{\\left( \\sigma_1^2 +  \\sigma_2^2 \\right)} $\r\n\r\nSo we still have two useful summary statistics, the precision ratio $r = \\sigma_2 / \\sigma_1$, and the tension $t$ where $t^2 = \\frac{\\left( \\mu_1 - \\mu_2 \\right)^2}{\\left( \\sigma_1^2 +  \\sigma_2^2 \\right)} $ . I think I get that \r\n\r\n$ D = \\log{r}  -  \\frac{1}{2} \\left( 1 - 1/r^2 \\right) + \\frac{1}{2} \\left( 1 + 1/r^2 \\right) t^2$\r\n\r\nDo you agree? (All this will be easier to read once you paste it into the notebook and check it! :-) )\r\n"}}
{"actor":{"display_login":"drphilmarshall"}}