percentile

Java Apache Commons getPercentile() different result that MS Excel percentile

依然范特西╮ 提交于 2019-12-06 19:27:26
问题 I have an algorithm that calculates the percentile(85) with Apache Commons of a series of values (12 values), for a later evaluation with a threshold to make a decision. The result is similar to the one given by Excel, but not equal, and sometimes this is critical for my application because with excel the result doesn't pass the threshold and with Apache Commons Math in Java it does, so I get different outputs. Here it is an example: Internet traffic (Mbps) every 2 hours 32,7076813360000000

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

懵懂的女人 提交于 2019-12-06 13:02:41
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) and the last 10% shoot up, therefore telling me that taking the 90% should see a lower response time.

Fast percentile in C++

这一生的挚爱 提交于 2019-12-06 11:14:17
My program calculates a Monte Carlo simulation for the value-at-risk metric. To simplify as much as possible, I have: 1/ simulated daily cashflows 2/ to get a sample of a possible 1-year cashflow, I need to draw 365 random daily cashflows and sum them Hence, the daily cashflows are an empirically given distrobution function to be sampled 365 times. For this, I 1/ sort the daily cashflows into an array called *this->distro* 2/ calculate 365 percentiles corresponding to random probabilities I need to do this simulation of a yearly cashflow, say, 10K times to get a population of simulated yearly

Calculating Percentiles (Ruby)

丶灬走出姿态 提交于 2019-12-06 10:50:58
问题 My code is based on the methods described here and here. def fraction?(number) number - number.truncate end def percentile(param_array, percentage) another_array = param_array.to_a.sort r = percentage.to_f * (param_array.size.to_f - 1) + 1 if r <= 1 then return another_array[0] elsif r >= another_array.size then return another_array[another_array.size - 1] end ir = r.truncate another_array[ir] + fraction?((another_array[ir].to_f - another_array[ir - 1].to_f).abs) end Example usage: test_array

Find percentile using an array in php

送分小仙女□ 提交于 2019-12-05 11:43:58
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? 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=>5, 41=>4.8, 40=>4.9, 34=>4.9, ); print("Unsorted array:<br/>"); print_r($array); arsort($array); print("<br

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

╄→гoц情女王★ 提交于 2019-12-05 06:12:57
[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 what a boxplot is: http://en.wikipedia.org/wiki/Box_plot Any help would be appreciated. Here is an

How do I get the percentile for a row in a pandas dataframe?

旧时模样 提交于 2019-12-05 05:12:52
Example DataFrame Values - 0 78 1 38 2 42 3 48 4 31 5 89 6 94 7 102 8 122 9 122 stats.percentileofscore(temp['INCOME'].values, 38, kind='mean') 15.0 stats.percentileofscore(temp['INCOME'].values, 38, kind='strict') 10.0 stats.percentileofscore(temp['INCOME'].values, 38, kind='weak') 20.0 stats.percentileofscore(temp['INCOME'].values, 38, kind='rank') 20.0 temp['INCOME'].rank(pct=True) 1 0.20 (Only showing the 38 value index) temp['INCOME'].quantile(0.11) 37.93 temp['INCOME'].quantile(0.12) 38.31999999999999 Based on the results above, you can see none of the methods are consistent with the pd

Java Apache Commons getPercentile() different result that MS Excel percentile

白昼怎懂夜的黑 提交于 2019-12-05 02:23:58
I have an algorithm that calculates the percentile(85) with Apache Commons of a series of values (12 values), for a later evaluation with a threshold to make a decision. The result is similar to the one given by Excel, but not equal, and sometimes this is critical for my application because with excel the result doesn't pass the threshold and with Apache Commons Math in Java it does, so I get different outputs. Here it is an example: Internet traffic (Mbps) every 2 hours 32,7076813360000000 41,2580429776000000 45,4453940200000000 48,8044409456000000 46,7462847936000000 49,8028100056000000 54

Conditional array to calculate percentiles

你说的曾经没有我的故事 提交于 2019-12-05 00:51:28
问题 I have some data as follows: val crit perc 0.415605498 1 perc1 0.475426007 1 perc1 0.418621318 1 perc1 0.51608229 1 perc1 0.452307882 1 perc1 0.496691416 1 perc1 0.402689126 1 perc1 0.494381345 1 perc1 0.532406777 1 perc1 0.839352016 2 perc2 0.618221702 2 perc2 0.83947033 2 perc2 0.621734007 2 perc2 0.548656662 2 perc2 0.711919796 2 perc2 0.758178085 2 perc2 0.820954467 2 perc2 0.478645786 2 perc2 0.848323655 2 perc2 0.844986383 2 perc2 0.418155292 2 perc2 1.182637063 3 perc3 1.248876472 3

Calculating Percentiles (Ruby)

倾然丶 夕夏残阳落幕 提交于 2019-12-04 17:54:49
My code is based on the methods described here and here . def fraction?(number) number - number.truncate end def percentile(param_array, percentage) another_array = param_array.to_a.sort r = percentage.to_f * (param_array.size.to_f - 1) + 1 if r <= 1 then return another_array[0] elsif r >= another_array.size then return another_array[another_array.size - 1] end ir = r.truncate another_array[ir] + fraction?((another_array[ir].to_f - another_array[ir - 1].to_f).abs) end Example usage: test_array = [95.1772, 95.1567, 95.1937, 95.1959, 95.1442, 95.061, 95.1591, 95.1195, 95.1065, 95.0925, 95.199,