Understanding term deterministic and non random [closed] - stochastic

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I am confused about a situation which is presented on the following slide:
Last sentences says that:
It is important to note that deterministic does not mean that
xt is non-random. What does this mean? If A and B are random variable, then x must be random right?

I think the point may be that nature may choose randomly among different paths, but once you know which path has been chosen you can predict future values of x_t on the path from past values x_{t-1}, etc. So e.g. nature may flip a coin to choose between the following two paths: x_t=0 for all t, and x_t=1 for all t. Then if you don't know the path, x_t is indeed random. But once you know x_{t-1}, you know x_t.

Related

What is the matrix diagonalization precision in matlab? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I don't know what kind of algorithm it runs in the background but it seems that it cannot handle matrices which contain elements on the order of 10^-5.
It can handle upto 16 digits. Type:
format long;
a = 1.234567890123456;
in your MATLAB code or command window.
4 decimal places is the limit of format short.

How to calculate a large combinatorial function in Matlab? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I would like to find the following simple combinatorial formula in Matlab
(nchoosek(n,j) * nchoosek(j,k) * nchoose(n-j,i-k)) / (nchoose(n,i)*nchoose(n,j))
but as my parameters are large Matlab return Inf as the result. Is anyone aware of a function or tool which can calculate this formula for me?
For each combinatorial number, say
nchoosek(n,j)
use the following instead:
exp( gammaln(n+1)-gammaln(j+1)-gammaln(n-j+1) )
The idea is to work with logarithms to avoid overflow, and take the exponential at the end. This relies on the fact that the logarithm of a factorial can be computed directly by means of gammaln.
Since your expression involves several terms, it's better to remain in the logarithm domain for as long as possible, and use exp only once at the end. For example,
nchoosek(n,j) * nchoosek(j,k)
would become
exp( gammaln(n+1)-gammaln(j+1)-gammaln(n-j+1) ...
+ gammaln(j+1)-gammaln(k+1)-gammaln(j-k+1) )
As a side note, in your specific case you can apply some simplifications. For example, nchoosek(n,j) appears both in numerator and denominator.

Solving Equations in Perl [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How should I solve my equations in Perl?
I know binary search is one solution (and perhaps pretty fast for my equations) but I would like to know if there is a ready to use solutions such as math packages or libraries so that I can use them instead of implementing my own solver?
NOTE:
This is, find x for a given y.
The functions are strictly increasing
The equations usually look like: y = a + b*sqrt(x) + b*x or y = sqrt(a*(x-b)**2*(x-c)/(x-d))
Please don't complain that "this is off topic" or "you should ask this in http://math.stackexchange.com". I want to see this problem from the programming point of view, particularly in Perl!
Have you considered using libraries? There's Math::LP, for instance.
See the Perl and Math tutorial from PerlMonks for more info.
Search for symbolic math on MetaCPAN. Lots of interesting looking options.
https://metacpan.org/search?q=symbolic+math

simulate dice with fair coin flip [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Given a fair coin (0/1), how do you simulate fair dice(0 to 5)
Obvious answer I know is toss 3 times, treat each toss as a bit to produce (2^3 = 0 to 7)
If result == 7, discard and repeat.
Well, theoretically worst case big-O of this is really bad (another question in itself, something to do with monte-carlo algos). Lets keep this soln on shelf.
So now my question is,
Is there/can there be n number of coin toss that can guarantee simulation of dice ?
Of course if exists would like to know minimum number of tosses. :)
In absence of a number that is both divisible by three and 2^n, I couldnt think of any way to solve this. :(

index must be a positive integer or logical: But it is [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
So, I'm attempting to access an array of length 165888. I'm looping through, calculating my index as I go. At one point, I get to 110689, and this, for some reason, throws the following error:
Attempted to access buf(110689); index must be a positive integer or logical.
Any ideas?
It was a rounding thing. I was doing a calculation, and forgetting to round.