Thread Subject: finding percentage of numbers in a set of random numbers

Subject: finding percentage of numbers in a set of random numbers

From: Deivy

Date: 21 Jun, 2009 12:11:10

Message: 1 of 5

Dear All,
I hope someone could help me with the follwing problem.

Suppose I have a set of ( say100 ) random numbers and I would like to
find out the two numbers between which 90% of the numbers lie. How do
I do this in matlab?


Thanks in advance.

Subject: finding percentage of numbers in a set of random numbers

From: us

Date: 21 Jun, 2009 12:21:01

Message: 2 of 5

Deivy <deivy71@gmail.com> wrote in message <d6e8eed5-5b14-45de-9bc5-91952c5b935d@f30g2000vbf.googlegroups.com>...
> Dear All,
> I hope someone could help me with the follwing problem.
>
> Suppose I have a set of ( say100 ) random numbers and I would like to
> find out the two numbers between which 90% of the numbers lie. How do
> I do this in matlab?
>
>
> Thanks in advance.
>

you need to be a bit more specific...
how do your random numbers look
- floats
- integers
- are numbers repeated

us

Subject: finding percentage of numbers in a set of random numbers

From: John D'Errico

Date: 21 Jun, 2009 12:26:02

Message: 3 of 5

Deivy <deivy71@gmail.com> wrote in message <d6e8eed5-5b14-45de-9bc5-91952c5b935d@f30g2000vbf.googlegroups.com>...
> Dear All,
> I hope someone could help me with the follwing problem.
>
> Suppose I have a set of ( say100 ) random numbers and I would like to
> find out the two numbers between which 90% of the numbers lie. How do
> I do this in matlab?

You need to specify if this is to be a central
interval. Do you want 5% on each side? Or
10% on one side? BE SPECIFIC!!!!!!! At least
do so if you want a clear answer.

What happens if you sort the data?

Now, suppose you were to exclude the first 5
numbers after the sort? Exclude the last 5 too.
What property would the numbers have that
remain?

It is a matter of choice as to how you will
define the location that lies between the 5th
and 6th point in terms of percentiles.

John

Subject: finding percentage of numbers in a set of random numbers

From: Bruno Luong

Date: 21 Jun, 2009 12:27:01

Message: 4 of 5

Deivy <deivy71@gmail.com> wrote in message <d6e8eed5-5b14-45de-9bc5-91952c5b935d@f30g2000vbf.googlegroups.com>...
> Dear All,
> I hope someone could help me with the follwing problem.
>
> Suppose I have a set of ( say100 ) random numbers and I would like to
> find out the two numbers between which 90% of the numbers lie. How do
> I do this in matlab?

You can use either:

HISTC to find estimate the pdf, CUMSUM to estimate the pdf, and truncated where you want

SORT your random data, then cut 5% of the points in upper end, another 5% in lower end.

Bruno

Subject: finding percentage of numbers in a set of random numbers

From: Deivy

Date: 21 Jun, 2009 12:43:21

Message: 5 of 5

Thanks a lot for all your responses.

I assume that all my data are integers and yes the numbers can repeat.

I also assume that I want the rest 10% to be 5% on each side.

I tried to sort them and still trying.

Thanks.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
percentage Sprinceana 22 Jun, 2009 04:41:23
percentage of n... Sprinceana 22 Jun, 2009 04:41:23
rssFeed for this Thread

Contact us at files@mathworks.com