Hi
Please can anyone write a code to generate random numbers of array length 2 from setMean and setCovariance?
10 2897
Hi
Please can anyone write a code to generate random numbers of array length 2 from setMean and setCovariance?
What is a random number of 'array length 2'?
kind regards,
Jos
What is a random number of 'array length 2'?
kind regards,
Jos
The class Random generates random numbers from a gaussian distribution that is one dimensional(univariate). My problem is how to generate bivariate random numbers from Mean(1.0,1.0) and Covariance(1.0,0.0,0.0,1.0)
The class Random generates random numbers from a gaussian distribution that is one dimensional(univariate). My problem is how to generate bivariate random numbers from Mean(1.0,1.0) and Covariance(1.0,0.0,0.0,1.0)
Do you know the algorithms for this?
Here's a good start.
From my paper copy of Abramowitz and Stegun (page 953):
Let { X1, X2 } be a pair of independent N(0,1) deviates. Then deviates
{ X1, rho*X1+(1-rho^2)^1/2*X2 } represent a pair of deviates from a bivariate
normal distribution with m=0, s=1, correlation coefficient rho.
There is a N(0,1) pseudo random number generator available, so there you go.
kind regards,
Jos
From my paper copy of Abramowitz and Stegun (page 953):
Let { X1, X2 } be a pair of independent N(0,1) deviates. Then deviates
{ X1, rho*X1+(1-rho^2)^1/2*X2 } represent a pair of deviates from a bivariate
normal distribution with m=0, s=1, correlation coefficient rho.
There is a N(0,1) pseudo random number generator available, so there you go.
kind regards,
Jos
How I could have used such a book in my 2nd year project (Discrete event simulation).
How I could have used such a book in my 2nd year project (Discrete event simulation).
It's quite an old (and famous!) book: it was first printed in 1964; I bought my
copy ten years later. I guess the current edition is the 10th or 11th edition.
Go to that link I supplied: it's a full scan of more than 1000 pages; ready for
downloading. (better late than never ;-)
kind regards,
Jos
It's quite an old (and famous!) book: it was first printed in 1964; I bought my
copy ten years later. I guess the current edition is the 10th or 11th edition.
Go to that link I supplied: it's a full scan of more than 1000 pages; ready for
downloading. (better late than never ;-)
kind regards,
Jos
Yep I've got the download link, I'm downloading it now. I really should have known about that book.
Do you know the algorithms for this?
Here's a good start.
Hi
the link you sent is for matlab.
I want to write a class that wraps up a random number generator given the following instance methods;
void setMean(float,float)
void setCovariance(float,float,float)
float[] generateRandom()
Hi
the link you sent is for matlab.
I want to write a class that wraps up a random number generator given the following instance methods;
void setMean(float,float)
void setCovariance(float,float,float)
float[] generateRandom()
Did you read my reply for starters? Next: google shows quite some results on
"bivariate normal distribution".
kind regards,
Jos
Hi
the link you sent is for matlab.
I want to write a class that wraps up a random number generator given the following instance methods;
void setMean(float,float)
void setCovariance(float,float,float)
float[] generateRandom()
And again :
Quote=You
"My problem is how to generate bivariate random numbers from Mean(1.0,1.0) and Covariance(1.0,0.0,0.0,1.0)"
The link teaches (not states) how to generate random numbers using a computer program.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Michael Allen |
last post by:
Hi all you Java 2D gurus out there. I wonder if you might be able to
help me. I've been dipping my toe into the world of Gaussian blurring
and with the help of a few articles and some bashing my...
|
by: Xcal |
last post by:
Anyone knows how to make a Gaussian fit to a histogram data using Python, or
where I can find a library that helps me in this task?
Tks everyone...
Paxcal
|
by: GBartgo |
last post by:
Is there someone who knows how to generate a gaussian mixture in c++?
|
by: Charles Banas |
last post by:
I'm not sure if this is the right place to ask about this, but I've
seen several posts in the past regarding Akima's Bivariate
Interpolations routines, and i'm wondering if someone can give me some...
|
by: Ricardo |
last post by:
Hello wizards, I need to get a Random number from an gaussian
distribution in Visual Basic .NET , somebody knows how to make it.
Thanks in advance.
|
by: j.f.c.neves |
last post by:
Hello,
I need some help in using the rlft3 (Numerical Recipes in c++ book,
Chapter 12) to apply a Gaussian smoothing to a 2D image. How do I
create a suitable filter function (page 535)?
...
|
by: bob |
last post by:
I was wondering if anyone can recommend a way to generate a Gaussian
random variable with standard deviation 1.
Thank you.
|
by: olorunfunmi |
last post by:
hello guys,
i'm in dire need of algorithms and c programs for cramer's rule and gaussian elimination. the ones i've been getting seemm toooooo complex
|
by: Verbal Kint |
last post by:
DEAR ALL,
I just have a very short question. In the FAQ list question 13.20 the
following text is mentioned:
"These methods all generate numbers with mean 0 and standard deviation
1. (To adjust...
|
by: Gerdus van Zyl |
last post by:
Does anyone have a relatively fast gaussian blur implemented in pure
python? Below is my attempt but it takes 2.9 seconds for a 320x240
image. Image comes from byte string: self.array =...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |