Title: Percentile Calculation · Issue #4 · doingmathwithpython/code · GitHub
Open Graph Title: Percentile Calculation · Issue #4 · doingmathwithpython/code
X Title: Percentile Calculation · Issue #4 · doingmathwithpython/code
Description: Hi, In your example code/chapter3/solutions/percentile_score.py you have following code: if percentile == 0: return data[0] elif percentile == 100: return data[-1] so for percentile == 0 it will return 1 and for percentile == 100 it retu...
Open Graph Description: Hi, In your example code/chapter3/solutions/percentile_score.py you have following code: if percentile == 0: return data[0] elif percentile == 100: return data[-1] so for percentile == 0 it will re...
X Description: Hi, In your example code/chapter3/solutions/percentile_score.py you have following code: if percentile == 0: return data[0] elif percentile == 100: return data[-1] so for percentile == 0 it will re...
Opengraph URL: https://github.com/doingmathwithpython/code/issues/4
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Percentile Calculation","articleBody":"Hi,\r\nIn your example code/chapter3/solutions/percentile_score.py you have following code:\r\n```python\r\n if percentile == 0:\r\n return data[0]\r\n elif percentile == 100:\r\n return data[-1]\r\n```\r\nso for percentile == 0 it will return 1 and for percentile == 100 it returns 14\r\nHowever based on the link that you provided [Calculating Percentiles](http://web.stanford.edu/class/archive/anthsci/anthsci192/anthsci192.1064/handouts/calculating%20percentiles.pdf)\r\npercentile for 1 should be 7.1 and for 14 it should be 92.9\r\nI checked other web sites and they all have different logic but most of them accept percentile from 1-99. 0 and 100 are invalid numbers.\r\nSo is there an error in your code?","author":{"url":"https://github.com/vlad-bezden","@type":"Person","name":"vlad-bezden"},"datePublished":"2017-05-02T01:32:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4/code/issues/4"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dc6673da-9b18-50dd-fccd-0a5189287670 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D53C:29573C:1C1A506:2760D83:6970E2E7 |
| html-safe-nonce | 70441370bd463b33b3586fb44ebed2265b528e4a39114d18df5f314f2e613a37 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTNDOjI5NTczQzoxQzFBNTA2OjI3NjBEODM6Njk3MEUyRTciLCJ2aXNpdG9yX2lkIjoiMjEyMzc3MDQ2MTAxNzkyNDMyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 17adf0166b0e8d7d88127ac79c5bcfe58767b47069cb2cd4c170db7ee1ce0406 |
| hovercard-subject-tag | issue:225568512 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/doingmathwithpython/code/4/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6bda782210a0956258293dc85674923feddf65fbc6877eb7e5a8d46ea8573805/doingmathwithpython/code/issues/4 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6bda782210a0956258293dc85674923feddf65fbc6877eb7e5a8d46ea8573805/doingmathwithpython/code/issues/4 |
| og:image:alt | Hi, In your example code/chapter3/solutions/percentile_score.py you have following code: if percentile == 0: return data[0] elif percentile == 100: return data[-1] so for percentile == 0 it will re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vlad-bezden |
| hostname | github.com |
| expected-hostname | github.com |
| None | a8b3a33ad16bd33428ccc7800d4ea7bfc6b4990584847afdcb92b020b61a949b |
| turbo-cache-control | no-preview |
| go-import | github.com/doingmathwithpython/code git https://github.com/doingmathwithpython/code.git |
| octolytics-dimension-user_id | 11791600 |
| octolytics-dimension-user_login | doingmathwithpython |
| octolytics-dimension-repository_id | 41512525 |
| octolytics-dimension-repository_nwo | doingmathwithpython/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 41512525 |
| octolytics-dimension-repository_network_root_nwo | doingmathwithpython/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b8a8c883a585a3dc6cb57fa8b7997b70c86a696c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width