BookmarkSubscribeRSS Feed
Kanyange
Fluorite | Level 6


Hi,

I have run a Proc univariate on my data, and get the report below, I would like to have the volume that I get for each quantile or percentile (Report below). Your help will be much appreciated.

Many Thanks

Quantiles (Definition 5)
QuantileEstimate
100% Max0.1039
99%0.0468
95%0.0382
90%0.0341
75% Q30.0287
50% Median0.0237
25% Q10.0201
10%0.0179
5%0.0169
1%0.015
0% Min0.0102
11 REPLIES 11
Reeza
Super User

What's your question?

Kanyange
Fluorite | Level 6

The volume in ecah percentile for example 0%, 1%, 5% , 10 % etc...

PaigeMiller
Diamond | Level 26

Hi, I don't understand either. When Reeza asks "What's your question?" and you say

The volume in ecah percentile for example 0%, 1%, 5% , 10 % etc...

This is not a question

Furthermore, you already have shown us the volume in each percentile, as computed by PROC UNIVARIATE, so you have the results. Problem solved, I think.

--
Paige Miller
Kanyange
Fluorite | Level 6

Sorry, maybe I didn't explain myself properly, I meant the actual volume...(Frequency)..for example you have first 0%, how many cutomers who fall in ecah percentile? For example when you rank your population into deciles , you will get volume like below, how do I get the volume using proc univariate (The actual number of cistomers)..Hope I make sense Many Thanks

decilenoresponseresponseTotal Volume
92,9736393,612
82,7324243,156
73,1754073,582
62,7993553,154
52,8583303,188
43,8694424,311
32,9903183,308
23,1193303,449
12,9592853,244
03,1592723,431
Reeza
Super User

What variable are you using to create your ranks?

I'd assume you'd run proc rank on your data followed by a proc freq to get that type of output, but you still haven't provided enough information.

Primarily what your data looks like, how you're assigning ranks.

Kanyange
Fluorite | Level 6

Basically, my data is just probabilities per customer, I wnat to check the distribution of the probabilities.....and the proc univariate gives you the report below, but i will aslo want to see the volume....(actual number of customers who fall in each percentile of quantile)

My raw data

customer_idProbability
10020.05
10030.6
10040.8
10050.02
10060.03
10070.5
10080.6

Desired Output

Quantiles (Definition 5)
QuantileEstimateVolume
100% Max0.025?
99%0.014?
95%0.0099?
90%0.0074?
75% Q30.0037?
50% Median0.002?
25% Q10.0015?
10%0.0012?
5%0.0011?
1%0.0009?
0% Min0.0008?
Reeza
Super User

Defined as how?

Check the definition of percentiles:Percentile - Wikipedia, the free encyclopedia

99% percentile reflects the data point where 99% are less than this number, you seem want to bin the numbers instead.

If you want to bin the numbers use proc rank and then proc freq as indicated.

Kanyange
Fluorite | Level 6

Hi Reeza,

So 99% of my population, let's say I have a Million of customers...so it means that 990,000 have a probability less than 0.014 for example...and if I want to know the volume of customers the 1% percentile (data point where 1% is less than 0.0009) , I just run a count(*) on customers who have less than 0.0009 and greater than 0.0008. Am I right? Thank you

Quantiles (Definition 5)
QuantileEstimateVolume
100% Max0.025?
99%0.014?
95%0.0099?
90%0.0074?
75% Q30.0037?
50% Median0.002?
25% Q10.0015?
10%0.0012?
5%0.0011?
1%0.0009?
0% Min0.0008?
Reeza
Super User

What would that represent though? It just tells you how many people have between 0.009 and 0.008?

What's the definition of that metric?

Tom
Super User Tom
Super User

Isn't it just roughly .99 * your N?

Otherwise output the percentiles from Proc Univariate and use them to bin your variable (?? proc score ??)  or to create a format and run the data again through a PROC FREQ with the new binned value or formatted value.

BruceBrad
Lapis Lazuli | Level 10

Sounds like what you want is just the number of cases with values between the first and second percentiles, the second and third percentiles and so on. By definition, this is always just 1% of the total number of (non-missing) cases in the file. It might be slightly above or below this if the data are not truly continuous or is weighted. In your decile example, the volume numbers are all around 10% of the sample size. Unless you are trying to look at the impact of ties in the data, it is not a particularly interesting statistic.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 1747 views
  • 0 likes
  • 5 in conversation