{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/629","labels_url":"https://api.github.com/repos/scipy/scipy/issues/629/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/629/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/629/events","html_url":"https://github.com/scipy/scipy/issues/629","id":13648231,"number":629,"title":"Statistics Review: linregress (Trac #102)","user":{"login":"scipy-gitbot","id":4182757,"avatar_url":"https://avatars.githubusercontent.com/u/4182757?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy-gitbot","html_url":"https://github.com/scipy-gitbot","followers_url":"https://api.github.com/users/scipy-gitbot/followers","following_url":"https://api.github.com/users/scipy-gitbot/following{/other_user}","gists_url":"https://api.github.com/users/scipy-gitbot/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy-gitbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy-gitbot/subscriptions","organizations_url":"https://api.github.com/users/scipy-gitbot/orgs","repos_url":"https://api.github.com/users/scipy-gitbot/repos","events_url":"https://api.github.com/users/scipy-gitbot/events{/privacy}","received_events_url":"https://api.github.com/users/scipy-gitbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/Migrated%20from%20Trac","name":"Migrated from Trac","color":"aaaaaa"},{"url":"https://api.github.com/repos/scipy/scipy/labels/prio-normal","name":"prio-normal","color":"999999"},{"url":"https://api.github.com/repos/scipy/scipy/labels/review","name":"review","color":"fbca04"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.stats","name":"scipy.stats","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/scipy/scipy/milestones/4","html_url":"https://github.com/scipy/scipy/milestones/StatisticsCleanup","labels_url":"https://api.github.com/repos/scipy/scipy/milestones/4/labels","id":320857,"number":4,"title":"StatisticsCleanup","description":null,"creator":{"login":"scipy-gitbot","id":4182757,"avatar_url":"https://avatars.githubusercontent.com/u/4182757?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy-gitbot","html_url":"https://github.com/scipy-gitbot","followers_url":"https://api.github.com/users/scipy-gitbot/followers","following_url":"https://api.github.com/users/scipy-gitbot/following{/other_user}","gists_url":"https://api.github.com/users/scipy-gitbot/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy-gitbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy-gitbot/subscriptions","organizations_url":"https://api.github.com/users/scipy-gitbot/orgs","repos_url":"https://api.github.com/users/scipy-gitbot/repos","events_url":"https://api.github.com/users/scipy-gitbot/events{/privacy}","received_events_url":"https://api.github.com/users/scipy-gitbot/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":132,"state":"open","created_at":"2013-04-25T16:32:08Z","updated_at":"2015-08-16T06:44:24Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2013-04-25T16:41:05Z","updated_at":"2015-08-16T07:02:59Z","closed_at":null,"body":"_Original ticket http://projects.scipy.org/scipy/ticket/102 on 2006-04-02 by @rkern, assigned to @rkern._\n\nThe function `linregress` in file source:trunk/Lib/stats/stats.py needs review.\n\nPlease look over the StatisticsReview guidelines and add your comments below.\n"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/131495760","html_url":"https://github.com/scipy/scipy/issues/629#issuecomment-131495760","issue_url":"https://api.github.com/repos/scipy/scipy/issues/629","id":131495760,"user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T07:02:58Z","updated_at":"2015-08-16T07:02:58Z","body":"Note that ``linregress`` returns R not R^2. The results are consistent:\r\n\r\n    In [1]: from scipy import stats\r\n\r\n    In [2]: y = [3, 4, 4]\r\n\r\n    In [3]: x = [4, 5, 6]\r\n\r\n    In [4]: res = stats.linregress(y, x)\r\n\r\n    In [5]: res\r\n    Out[5]: LinregressResult(slope=1.5, intercept=-0.5, rvalue=0.8660254037844386, \r\n                pvalue=0.33333333333333343, stderr=0.86602540378443882)\r\n\r\n    In [6]: res.rvalue**2\r\n    Out[6]: 0.74999999999999989"}}