what is the condition under which the markov chain converge? [closed] - math

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 10 years ago.
Improve this question
I'm programming some program which calculates the limit of markov chain.
if the markov matrix diverges, I should transform it into the form
dA + (1-d)E, where both A and E are n * n matrix, and all of the elements of E are 1/n.
But if I apply that transformation when the input converges, the wrong value comes out.
Is there any easy way to check if the markov matrix converges?

I'm not going to go into detail, because it's an entire field unto itself. Although the general convergence theorem states that any finite Markov chain that is aperiodic and irreducible converges (to its stationary distribution). Irreducibility is simple to check (it's equivalent to connectedness in graphs), and periodicity is also easy to check (the definition of both is found in the first chapter of the book below, and the convergence theorem is proved in chapter 4 of the book).
It's worth noting that if there isn't irreducibility that can be easily solved in the symmetrical case by splitting the state space into "connected components", and considering each one separately. While periodicity can be patched by doing something similar to what you're suggesting. It's called creating the lazy Markov chain. If you want to understand the whole topic a little better (Mixing times for example will be very helpful in your convergence algorithm), this is an excellent book (available for free):
http://pages.uoregon.edu/dlevin/MARKOV/markovmixing.pdf

Related

Numerical integration of an unknown function [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 months ago.
Improve this question
For a school project I have to determine a function u(t) of time. I have derived an expression of the following form:
(https://i.stack.imgur.com/vNrYb.png)
with a,b,c,d constants (not necessarily integers). I have figured out that this problem is only solvable with numerical integration with initial condition u(0)=u_0, yet I don't know how to do this particular problem.
I have looked at all the numerical integration methods I have learnt so far, but they all seem to apply for polynomials or for functions where you know the function evaluations at specific points.
There are lots of ways to calculate an approximate value for u(t), some simple but requiring a lot of iterations, and more complex requiring fewer iterations. Assuming a,b,c,d are real numbers, and u_0 = u(0) then for t > 0, one could just split the interval between 0 and t into N sub-intervals and calculate
u_(i+1) = u_i + (du/dt)(t_i)*t/N
where t_i = i*t/N
then,
u_N = u(t).
If N is not sufficiently large, the result will be inaccurate. To obtain a satisfactory N is more art than science. Just printing the results for increasing N should give you an idea of how large N needs to be to obtain the level of accuracy you need. Adding higher order terms (d^2u/dt^2 etc.) can sometimes improve speed and accuracy.
You can't numerically integrate anything unless you have values for all those constants.
I don't know what numerical integration schemes you looked at, but I think Euler's method or Runga-Kutta would both be worth trying.
You don't say which language you want to use. Python would be a fine choice. So would Java. Lots of libraries to help.
Wolfram Alpha has a closed-form solution here. It's a separable, non-linear ODE. You'll need to know hypergeometric functions to evaluate.

How to show that this set is a sigma algebra [closed]

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 1 year ago.
Improve this question
I am studying "FAMILIES OF SETS" in the book "Real analysis for graduate
students(v 3.1)" by Richard F. Bass and I could not figure out this example.
The example
Definition of an algebra and sigma-algebra
They are stating that
Verifying parts (1) and (2) of the definition is easy.
This is exactly the part I do not understand.
I do not understand how we define the complement for a set {0,1,2}. The set {0,1,2} should be in D, as it is countable, but what is its complement? It seems that it is {...,-3-2-1} union {3,4,5,...}. Are these sets both countable?
And what about the set {1.1, 2.5, 3.4}, how do we define the complement of such a set? (and how do we show that it is in fact in D?)
P.S.
I do not know how to write formulas so I'm sorry for the ugly mathematical writing
The complement of {0,1,2} in R is every real number except those three. It's also in the algebra because that was the definition, you defined an algebra of all countable subsets or the complements of countable subsets.

Finding private Key x Big integers [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Well is it possible to find private key x for this equation y=g^x mod p of course big integers if you have p ,g, y, q?.
What method can be used if there is method to find it out? ..........Note:These are big Integers
This is called the discrete logarithm problem. You seem to be interested in the prime field special case of this problem.
For properly chosen fields with sufficiently large p this is infeasible. I expect this to be reasonably cheap (100$ or so) for 512 bit p and extremely expensive at 1024 bit p. Going beyond that it quicky becomes infeasible even for state level adversaries.
For some fields it's much cheaper. For example solving DL in binary fields (not prime fields as in your example) produced quite a few recent papers. For example Discrete logarithm in GF(2^809) with FFS and On the Function Field Sieve and the Impact of Higher Splitting Probabilities: Application to Discrete Logarithms in F_2^1971.

What's the minimum sample required for correlation analysis (linear model in R) [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 9 years ago.
Improve this question
I'm trying to perform correlation analysis with
R's linear model
lm()
I'm wondering what is the reasonable minimum sample for it?
Is there any rule for determining that?
As a rule of thumb, 20, 30, 1000, samples As a rule of thumb, you should be wary of rules of thumb. Excluding perhaps that "less is more, except of course for sample size" (Cohen & Cohen, 1983: 169-171).
You could ask your question on https://stats.stackexchange.com/ but they're probably going to give you answers that might not be the round number that you're looking for. For example:
Is the number 20 magic?
Is there a reference that suggest using 30 as a large enough sample size?
Rules of thumb for minimum sample size for multiple regression
What is a reasonable sample size for correlation analysis for both overall and sub-group analyses?
30 Samples. Standard, Suggestion, or Superstition?
etc.
You'll get more useful responses if you edit your question here to include a reproducible example that resembles your actual use-case and then ask for help coding calculations of relevant measures of error. You might explore the pwr package before you edit your question (see here for examples: http://www.statmethods.net/stats/power.html).
Do a bit of googling to find the names of error measures you think will be useful to you. You might start with these:
Lenth, R. V. (2001), Some Practical Guidelines for Effective Sample Size Determination, The American Statistician, 55, 187-193.
Wheeler, R. E. (1974), 'Portable Power', Technometrics, 16, 193–201.
Cohen, J. & Cohen, P. (1983). Applied multiple regression/correlation analysis for the behavioral sciences (2nd ed.).(Hillsdale, NJ: Erlbaum)

Simulate ARFIMA process with custom initial values [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 10 years ago.
Improve this question
My question deals with the fracdiff.sim function in R (in the fracdiff package) for which the help document, just like for arima.sim, is not really clear concerning initial values.
It's ok that stationary processes do not depend on their initial values when time grows, but my aim is to see in my simulations the return of my long memory process (fitted with arfima) to its mean.
Therefore, I need to input at least the p final values of my in-sample process (and eventually q innovations) if it is ARFIMA(p,d,q). In other words, I would like to set the burn-in period's length to 0 and give starting values instead.
Nevertheless, I'm currently not able to do this. I know that fracdiff.sim makes it possible for the user to chose the length of a burning period (which leads to the stationnary behavior) and the mean of the simulated process (it is simulated and then translated to make the means match). There is also a condition: the length of the burn-in period must be >= p+q. What I suppose is that there is something to do with the innov argument but I'm really not sure.
This idea is inspired by the arima.sim function which has a start.innov argument. However, even if my aim was to simulate an ARMA(p,q), I'm not sure of the exact use of this argument (the help is quite poor) : must we input only q innovations ? put with them the p last values of the in-sample process ? In which order ?
To sum up, I want to simulate ARFIMA processes starting from a specific value and having a specific mean in order to see the return to the mean and not only the long term behavior. I fund beginnings of solutions for arima.sim on the internet but nobody clearly answered, and if the solution uses start.innov, how to solve the problem for ARFIMA processes (fracdiff.sim doesn't have the start.innov argument) ?
Hopping I have been clear enough,

Resources