In my book, it says the way to produce a random integer from, for example, 1-50 is to use srand() % 50 + 1.
But wouldn't that give "1" the chance of showing up more often than other numbers?
If srand is 0, then the random result is 1. If srand is 50, then the random result is also 1. The other...
Hi all, I'm trying to generate uniform random vectors with n dimensions.
To be more precise, each of the elements of the vector must be a uniform distributed variable in [0,1]
The constraint is that the sum of the elements of the vector must be 1.
I tried different solutions for over a week but...
Hi, I am making a program with the simulation software Breve. It codes in Python or in Steve (their own language). In my simulation, spherical particle with random radius are being spawned at random position into a little zone. My problem is that those particle cannot be superposed. I don't know...
My friend and I were having a discussion, and we both can't seem to see the other side's point of view. The question was whether a certain "operation" is random or not. This is what it is:
Suppose you have an input, it doesn't matter what it is. The first "operation" is just a completely...
[FONT=arial narrow]Dear friends,
I have divided the time into slots of fixed size. And i toss a coin of probability of heads 1/2 in the first slot. In the next slot, i toss a coin of probability of head 1/4, and in the i^th slot i toss a coin of prob of head 1/2^i. I do this until i get a...
Hello, my calculator (sharp el-w516) can generate random fractions like 237/431. I was curious if there was a way to do this by hand.
I would like to be able to roll any sided die by multiplying the random fraction by the side number. For example if I wanted to roll a d20 I could take the...
1.How to set the initial state of the Pseudo Random Sequence Generator?
2. I'm using 74LS74 D-flipflop.I'm unclear how to use clear and preset enable inputs to set the initial sequence.
3. I tried doing the experiment by directly giving the 0001 sequence through respective...
Homework Statement
Compute P(X=k l X+Y=p)Homework Equations
The Attempt at a Solution
No idea. Kind of understand page #1. Although it seems like there's a lot of unnecessary stuff. Could have gone straight from the top to the bottom. And I don't know why/if you even have to substitute the...
I am trying to make a game in Chipmunk Basic using the arrow keys but I can't because I cannot figure out how. I have programmed in other Basic Softwares but I cannot figure out how to use the arrow keys and spacebar in my programs. An example (much simplified) of a game I am making is snake (if...
Hi
I want to generate a set of random numbers according to a specific distribution, namely given by
f(v) \propto v^3\exp(-v^2 C)
where C is a constant. It is clear how to do it with a distribution already implemented in Mathematica...
Homework Statement
X1 and X2 are two independent discrete random variables with
P(X1 = k) = c3-k
P(X2 = k) = d4-k
for k in natural numbers and where X1, X2 in natural numbers is almost always valid. 0 is not include in N.
Find constants c and d.
Homework Equations
The Attempt...
Homework Statement
In the winter, the monthly demand in tonnes, for solid fuel from a coal merchant may be modeled by the continuous random variable X with probability density function given by:
f(x)=\frac{x}{30} 0≤x<6
f(x)=\frac{(12-x)^{2}}{180} 6≤x≤12
f(x)=0 otherwise
(a)...
Ok, so I have this written in my notes and while going over it I have a few questions:
Suppose cubical boxes are made so that the length, X (in cm) of an edge is distributed as
f(x)=\frac{1}{2}
for 9≤X≤11
0 otherwise
What sort of distribution will the volume, Y, of the boxes have...
Hi!
I'm trying to find a good way to predict fatigue caused by a random vibration (given PSD).
I know at least 2 ways of doing it but I'm questioning them both.
One of them is using the rain flow count algorithm at a simulated acceleration/time signal to generate a certain amount of...
Suppose that X is a random variable distributed in the interval [a;b] with pdf f(x) and cdf F(x). Clearly, F(b)=1. I only observe X for values that are bigger than y.
I know that E(X|X>y)=\frac{\int_y^b xf(x)dx}{1-F(y)}.
Moreover, \frac{∂E(X|X>y)}{∂y}=\frac{f(y)}{1-F(y)}[E(X|X>y)-y]
I...
Ive been working with random variables for a while and only today have I come up with a basic question that undermines what I thought I knew...
If I have two random variables X and Y, when am I allowed to multiply them? i.e. Z=XY
Let S_1 and S_1 be sigma algebras such that S_1 is contained in...
Homework Statement
This is an example in a textbook; it already has the solution. I don't understand how E[X|Y] was obtained though. So my question is how do I calculate E[X|Y] from the information given?
http://img689.imageshack.us/img689/484/20120413134552578.jpg...
Hi Guys,
Long time reader first time poster...
This simple question has stumped me all day and I think I've finally cracked it! I'm hoping someone can confirm that, or tell me how wrong I am - either is fine :)
One in 1000 cows have a rare genetic disease. The disease is not contagious...
Hi folks,
I need to evaluate (numerically) a multi-dimensional integral of the form
\int_A f(x) dx.
Now in my application, I already have points inside the domain A which are distributed like \frac{f(x)}{\int_A f(x) dx}. So I hoped I could use these random points in some importance sampling...
Here is the homework question. I only have an issue with part c but have shown all my work up until then. Any help is appreciated!
Mr and Mrs Brown decide to continue having children until they either have their first boy or until they have
five children. Assume that each child is equally...
David C. White owns a small advertising business. He has twelve employees. The names
of the employees are given below.
1. Becker
2. Brown
3. Chasten
4. Ito
5. Kim
6. Spitzer
7. Taylor
8. Walt
9. Wang
10. Zhang
11. Zhao
12. Zhu
Use the list of random digits below to select...
Hi,
Apologies that this is basic question but I have to start somewhere! (-:
The problem is succinctly stated in the msg title but, in greater detail; I'm working with some biological data from which samples have been taken. The sampling should have been at random. The samples include...
Homework Statement
A submarine has three navigational devices but can remain at sea if at least two are working. Suppose that the failure times are exponential with means 1 year, 1.5 years, and 3 years. What is the average length of time the boat can remain at sea?Homework Equations
Density...
I would like to know the distribution of z as the euclidean distance between 2 points which are not centred in the origin. If I assume 2 points in the 2D plane A(Xa,Ya) and B(Xb,Yb), where the Xa~N(xa,s^2), Xb~N(xb,s^2), Ya~N(ya,s^2), Yb~N(yb,s^2), then the distance between A and B, would be...
Homework Statement
So, I know the pdf for independent random variables is found by using the convolution; the pdf is f[sub:X+Y](a) = ∫ f[sub:X](a-y)f[sub:Y](y)dy, but can I just use the density function for a function of a random variable instead; that is: f[sub:X+Y](x[u,v], y[u,v])(Jacobian...
Homework Statement
Two variables, X and Y have a joint density f(x,y) which is constant (1/∏) in the circular region x2+y2 <= 1 and is zero outside that region
The question is: Are X and Y independent?
Homework Equations
Well, I know that for two random variable to be independent...
Homework Statement
let x_{i} be a random variable, and let y_{j} = \sum x_{i}.
The variance of the random distribution of the x_{i}'s is known, and each y is the sum of an equal amount of x_{i}'s, say N of them.
How do I compute the variance of y in terms of \sigma^2_{x} and N?
Homework...
Hello Everyone :)
I have been facing a little difficulty when encountering such kind of problems . i have also written down my line of thinking and approach which i take to solve them. So, please try to give me the correct line of thinking while solving such problems:
1. If A is invertible...
I've been struggling with this problem for about two weeks. My supervisor is also stumped - though the problem is easy to state, I don't know the proper approach to tackle it. I'd appreciate any hints or advice.
Let V be an random k-dimensional vector subspace of ℝn, chosen uniformly over...
Hey everyone.
I haven't taken statistics yet, but as a matter of interest I was contemplating the fact that uniform random variables added together seem to generate "bell curve" like distributions.
My question is if I add up an infinite number of equally distributed random variables will the...
I have two multivariate normally i.i.d random variables, x and y, that are size n vectors. Let us assume for simplicity that their variances are 1. From these random variables, I form two vectors that contain their means, and denote these mx and my.
I know that if mx = my, then W = (mx -...
Is an infinite series of [nonrepeating] random numbers possible?
That is, can the term "random" apply to a [nonrepeating] infinite series?
It seems to me that Cantor's logic might not allow the operation of [nonrepeating] randomization on a number line approaching infinity.
Hi all I was wondering if anybody knew any good books (preferably textbooks) on random matrix theory?
thanks in advance.Edit: My apologies if this is posted in the wrong section.
[b]1. X_1,X_2\cdots X_n\:\text{are IID Random Variables with CDF}\,F(x)\:\text{and PDF}\,f(x)\\
\text{then What is the CDF of Random variable }\,Max(X_1,X_2\cdots X_n)
Homework Equations
[b]3. \text{Since Y will be one among}\,X_1,X_2\cdots X_n,\text{why cannot its CDF be }\,F(x)\\\text{I need...
1. Homework Statement
During a typical Pennsylvania winter, I80 averages 1.6 potholes per 10 miles. A certain county is responsible for repairing potholes in a 30 mile stretch of the interstate. Let X denote the number of potholes the county will have to repair at the end of next winter.
1...
I know the E[X] = Integral between [-inf,inf] of X*f(x) dx
Where X is normally distributed and f(x) is the PDF
How do I find the expectation of X4?
Bare with me because I'm useless in Latex
So far what I've done is written the integral as Integral between [-inf,inf] of X4*f(x) dx...
Homework Statement
1. A test consists of 10 true-false questions.
(a) In how many ways can it be completed? (HINT: The task of completing the test consists
of 10 stages. Use the Product Rule.)
(b) A student answers the questions by
flipping a coin. Let X denote the number of correctly...
Homework Statement
There is a population of 30 elk. 6 elk are captured, tagged and then released into the wild. Then later 5 elk are captured, what is the probability that k elk are tagged?
Homework Equations
p=6/30 = 1/5P = \stackrel{n}{k} * pk * (1-p)k
\stackrel{n}{k} is n...
I'm a huge noob and I don't know much about physics and space and stuff, but I was thinking about this in the shower today..
Anyone care to comment? Or correct me on anything?
Ok, so I was talking about to Daniel about Gravity, the Sun, and Black Holes.. (Yes we are ghetto nerdy xD) And i...
I hope I wrote that correctly but I'm trying to find the joint. I heard it was impossible from someone.
X = A/R
A~BIN(n1, p1)
R~BIN(n2, p2)
I know I shouldn't be using the Jacobian method for Discrete distributions but I have to do it anyway.
Anyone know?
Hi, I'm looking at how to derive the mean-squared-distance from the velocity autocorrelation for a random walk. It is given on this page: http://www.compsoc.man.ac.uk/~lucky/Democritus/Theory/msd2.html
Near the middle of that page the author says 'defining u'=u+s and integrating over u, results...
What is the probability that a number selected from 0-9 will be the same number as one randomly selected from 0-4?
Relevant equations: $$P(A \cap B) = P(A)*P(B|A)$$
I used the equation above, using A as the event that the number selected from 0-9 will be between 0 and 4, and B as the event that...
[FONT=CMMI12] [FONT=CMR12]
(1)Consider the expected duration of the modified random walk. Show that conditioning on the first step produces a recurrence equation of the following form. E[FONT=CMMI8][FONT=CMMI8]a [FONT=CMR12]=...