percentile

Calculate and plot 95% range of data on scatter plot in Python

一个人想着一个人 提交于 2019-12-11 06:20:06
问题 I wish to know, for a given predicted commute journey duration in minutes, the range of actual commute times I might expect. For example, if Google Maps predicts my commute to be 20 minutes, what is the minimum and maximum commute I should expect (perhaps a 95% range)? Let's import my data into pandas: %matplotlib inline import pandas as pd commutes = pd.read_csv('https://raw.githubusercontent.com/blokeley/commutes/master/commutes.csv') commutes.tail() This gives: We can create a plot easily

Cut data and access groups to draw percentile lines

ぐ巨炮叔叔 提交于 2019-12-11 00:35:49
问题 I'm very new to R so please be gentle. I have a dataset containing timestamps and some data. Now I'd like to draw a graph where: The data is grouped by e.g. 60 mins intervals and some percentile lines are drawn. I'd like to have a graph with the time as x-axis and the gap as y-axis. I imagine something like boxplot but for a better overview - since I have a long measurement - instead of boxes I'd like to have lines that connect the mean values, 3 percentiles, 97 percentiles and 100

Percentile calculator

你离开我真会死。 提交于 2019-12-10 19:49:33
问题 I have been trying to create a small method to calculate given percentile from a seq. It works.. almost. Problem is I don't know why is doesn't work. I was hoping one of your 'a bit smarter' people than me could help me with it. What I hope the result would be is that it would return the item from the seq that n prosent of the seq is smaller than equal than returned value. def percentile[Int](p: Int)(seq: Seq[Int]) = { require(0 <= p && p <= 100) // some value requirements require(!seq

Convert array into percentiles

♀尐吖头ヾ 提交于 2019-12-10 15:34:59
问题 I have an array that I want to convert to percentiles. For example, say I have a normally distributed array: import numpy as np import matplotlib.pyplot as plt arr = np.random.normal(0, 1, 1000) plt.hist(arr) For each value in that array, I want to calculate the percentile of that value (e.g. 0 is the 50th percentile of the above distribution so 0 -> 0.5). The result should be uniformly distributed since each percentile should have equal weight. I found np.percentile but this function returns

Selecting Percentile curves using gamlss::lms in R

自作多情 提交于 2019-12-08 08:39:17
问题 I am using example code from gamlss package to draw percentile curves: library(gamlss) data(abdom) lms(y,x , data=abdom, n.cyc=30) It is drawing its own set of percentile curves. How can I choose to draw only 10th, 50th and 90th percentile curves? Also I want to avoid plotting of points so that only curves are drawn. Thanks for your help. 回答1: It's always a good idea to read the help pages: > centiles(h,xvar=abdom$x, cent=c(10,50,90), points=FALSE) % of cases below 10 centile is 8.688525 % of

Getting percentile values from gamlss centile curves

会有一股神秘感。 提交于 2019-12-07 18:51:32
问题 This question is related to: Selecting Percentile curves using gamlss::lms in R I can get centile curve from following data and code: age = sample(5:15, 500, replace=T) yvar = rnorm(500, age, 20) mydata = data.frame(age, yvar) head(mydata) age yvar 1 12 13.12974 2 14 -18.97290 3 10 42.11045 4 12 27.89088 5 11 48.03861 6 5 24.68591 h = lms(yvar, age , data=mydata, n.cyc=30) centiles(h,xvar=mydata$age, cent=c(90), points=FALSE) How can I now get yvar on the curve for each of x value (5:15)

Loadrunner Analysis: How can the 90th percentile be higher than the average?

筅森魡賤 提交于 2019-12-07 18:50:09
问题 A bit confused. I have a few Loadrunner Analysis from a report I've run. I'm new to testing. My understanding of the 90th percentile is that, given that it takes the 90th percentile and leaves out the outliers, it presents a truer picture. Although I'm looking at two different reports and in both, the 90th percentile response time is higher than the average response time given in the Summary Report. How can that be possible? I'm looking at the graph of transaction response times (Percentile)

Selecting Percentile curves using gamlss::lms in R

回眸只為那壹抹淺笑 提交于 2019-12-07 17:02:31
I am using example code from gamlss package to draw percentile curves: library(gamlss) data(abdom) lms(y,x , data=abdom, n.cyc=30) It is drawing its own set of percentile curves. How can I choose to draw only 10th, 50th and 90th percentile curves? Also I want to avoid plotting of points so that only curves are drawn. Thanks for your help. It's always a good idea to read the help pages: > centiles(h,xvar=abdom$x, cent=c(10,50,90), points=FALSE) % of cases below 10 centile is 8.688525 % of cases below 50 centile is 50.16393 % of cases below 90 centile is 90 来源: https://stackoverflow.com

Find percentile using an array in php

烈酒焚心 提交于 2019-12-07 05:15:32
问题 I have a array like this array( 45=>5, 42=>4.9, 48=>5, 41=>4.8, 40=>4.9, 34=>4.9, ..... ) Here index is userid and value is his score. Now what i want is to achieve percentile for on user for example percentile of 45,48 would be 99 and 42,40,34 would be 97 and 41 would be 94. How i can achieve this? 回答1: Sort the array based on the "score", ascending Percentile = (Index of an element in the sorted array ) * 100 / (total elements in the array) Example: <?php $array = array( 45=>5, 42=>4.9, 48=

How can I return the numerical boxplot data of all results using 1 mySQL query?

纵饮孤独 提交于 2019-12-07 01:04:25
问题 [tbl_votes] - id <!-- unique id of the vote) --> - item_id <!-- vote belongs to item <id> --> - vote <!-- number 1-10 --> Of course we can fix this by getting: the smallest observation (so) the lower quartile (lq) the median (me) the upper quartile (uq) and the largest observation (lo) ..one-by-one using multiple queries but I am wondering if it can be done with a single query. In Oracle I can use COUNT OVER and RATIO_TO_REPORT , but this is not supported in mySQL. For those who don't know