Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
normrnd -> normal distribution

Subject: normrnd -> normal distribution

From: matlab user

Date: 26 May, 2008 21:03:04

Message: 1 of 6

I have a quick question: I need to randomly generate
numbers for some real data measurements that I have (i.e.
epand my data for a simulation model). I use normrnd to do
this in matlab. now my question is:

i have a sample that consists of 20 observations and I
would like to create four samples in total (3 randomly
generated plus the original) to test a hypothesis. Would it
be enough to use the original sample of 20 observations to
randomly generate similar sequence of numbers (mean and
standard deviation from the original sample) or I need a
minimum number of samples each with 20 observations to
statistically do that in matlab?

thank you,

Subject: normrnd -> normal distribution

From: carlos lopez

Date: 26 May, 2008 21:19:01

Message: 2 of 6

Have you considered bootstrap techniques?
Regards
Carlos

Subject: normrnd -> normal distribution

From: matlab user

Date: 26 May, 2008 21:40:03

Message: 3 of 6

Hello Carlos,

Thank you for the help. Could you please tell me how can I
apply this to expand the data?

also, is the sample size of 20 observations good enough to
do bootstrapping?


Thank you,



"carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote in
message <g1f9g5$j1e$1@fred.mathworks.com>...
> Have you considered bootstrap techniques?
> Regards
> Carlos

Subject: normrnd -> normal distribution

From: carlos lopez

Date: 26 May, 2008 22:06:01

Message: 4 of 6

"matlab user" <abc@nowhere.com> wrote in message
<g1fanj$r6e$1@fred.mathworks.com>...
> Hello Carlos,
>
> Thank you for the help. Could you please tell me how can I
> apply this to expand the data?
Indeed you are not expanding the data; you are improving
your estimates by resampling it.
The bootstrap is considered in the stats toolbox (through
functions BOOTSTRP, BOOTCI, etc.), but you might find also
other free contributions somewhere (see, for example,
http://www.maths.lth.se/matstat/stixbox/).
>
> also, is the sample size of 20 observations good enough to
> do bootstrapping?
It depends on your problem. Do you feel that you have enough
observations to capture the essence of your variability? If
so, you can improve your confidence by using bootstrap.
Otherwise you cannot do too much anyway.
I should warn you that I am far from being an expert on
this; google for the topic and you will find better advice
somewhere else. On principle it appears that bootstrap fits
with your problem.
Regards
Carlos

Subject: normrnd -> normal distribution

From: matlab user

Date: 26 May, 2008 22:25:03

Message: 5 of 6

Thank you Carlos,

So i use bootstrapping to resample the data and could not
use it as a technique to expand the data.

here is what i am trying to do: i have data measurements
for execution time of some 500 items (same domain). The
data consists of 20 execution time observations over 10-day
period.

I am trying to expand the data based on this original data
(i.e. simulate ) to be let's say 1,000 (1 original and 1
randomly generated). What I do so far is that I get the
distribution of the original sample (20 observations) and I
use the Matlab function 'normrnd' to generate a sample also
with 20 observations using the mean and standard deviation
of the original sample. Is this acceptable? I do get a new
sample with different mean and standard deviation but the
variation of course is not huge.

also, I do see variance in the 20 observations of the
original sample and based on this I generate new samples.
would this be acceptable? or is there another way in Matlab
to do this?

Any suggestions/response would be greatly appreciated.


thank you

"carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote in
message <g1fc89$8ir$1@fred.mathworks.com>...
> "matlab user" <abc@nowhere.com> wrote in message
> <g1fanj$r6e$1@fred.mathworks.com>...
> > Hello Carlos,
> >
> > Thank you for the help. Could you please tell me how
can I
> > apply this to expand the data?
> Indeed you are not expanding the data; you are improving
> your estimates by resampling it.
> The bootstrap is considered in the stats toolbox (through
> functions BOOTSTRP, BOOTCI, etc.), but you might find also
> other free contributions somewhere (see, for example,
> http://www.maths.lth.se/matstat/stixbox/).
> >
> > also, is the sample size of 20 observations good enough
to
> > do bootstrapping?
> It depends on your problem. Do you feel that you have
enough
> observations to capture the essence of your variability?
If
> so, you can improve your confidence by using bootstrap.
> Otherwise you cannot do too much anyway.
> I should warn you that I am far from being an expert on
> this; google for the topic and you will find better advice
> somewhere else. On principle it appears that bootstrap
fits
> with your problem.
> Regards
> Carlos
>

Subject: normrnd -> normal distribution

From: carlos lopez

Date: 26 May, 2008 22:34:01

Message: 6 of 6

"matlab user" <abc@nowhere.com> wrote in message
<g1fdbv$fkq$1@fred.mathworks.com>...
> Thank you Carlos,
>
> So i use bootstrapping to resample the data and could not
> use it as a technique to expand the data.
>
> here is what i am trying to do: i have data measurements
> for execution time of some 500 items (same domain). The
> data consists of 20 execution time observations over 10-day
> period.
>
> I am trying to expand the data based on this original data
> (i.e. simulate ) to be let's say 1,000 (1 original and 1
> randomly generated). What I do so far is that I get the
> distribution of the original sample (20 observations) and I
> use the Matlab function 'normrnd' to generate a sample also
> with 20 observations using the mean and standard deviation
> of the original sample. Is this acceptable?
What do you plan to do with that?

> I do get a new
> sample with different mean and standard deviation but the
> variation of course is not huge.
Bootstrap will help you estimate, with specified confidence
intervals, either the mean value, the standard deviation,
etc. of the population given only your sample data.
This DOES NOT assume that your population is normally
distributed; it can be (almost) anything. So your method
requires an additional property to the data (i.e. normal
distribution) unlike bootstrap.
>
> also, I do see variance in the 20 observations of the
> original sample and based on this I generate new samples.
> would this be acceptable? or is there another way in Matlab
> to do this?
Your problem is presently not with matlab, but with
statistics. You should read a little bit more regarding
resampling (which also includes other techniques) before
going on.
Hopefully someone else more skilled could shed some
additional light on your problem.
Regards
Carlos

Tags for this Thread

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.

Contact us