% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter14_multiple_decrement.R
\name{markov_nstep_prob}
\alias{markov_nstep_prob}
\title{Multi-step transition probability}
\usage{
markov_nstep_prob(P, n, i, j)
}
\arguments{
\item{P}{Square transition-probability matrix.}

\item{n}{Nonnegative integer number of steps.}

\item{i}{Starting-state index.}

\item{j}{Ending-state index.}
}
\value{
A numeric scalar.
}
\description{
Computes an entry of the matrix power \eqn{P^n}.
}
\examples{
P <- matrix(c(0.9, 0.1, 0, 1), nrow = 2, byrow = TRUE)
markov_nstep_prob(P, n = 3, i = 1, j = 2)

}
