Finite Markov Chain Imbedding Calculatorfor Runs and Patterns

Compute exact probabilities for runs, patterns, scan statistics, matching events, and Cochran-type tests using finite Markov chain imbedding methods.

Launch the FMCI Web App
Runs in your browser. No MATLAB installation required.
Process Monitoring

Longest-run and scan-statistic ideas are used for exact monitoring and change detection.

FMCI Web App
Home
Waiting Time
Patterns
Scan Stat
Longest Run
Cochran's Test
Waiting Time
Number of Patterns
Scan Statistic
Longest Run
Number of Runs
Matching Probability
Cochran's Test
Genomics / CNV

Scan statistics and run-based summaries can help detect clustered signals and copy-number variation regions.

About FMCI

Exact probability calculations for structured sequence events

Finite Markov chain imbedding converts a runs, patterns, or scan-statistic problem into transitions among a finite collection of states, allowing probabilities to be calculated recursively and exactly.

What this web app does

The FMCI Web App provides a browser-based interface for studying events in binary sequences under independent-trial and Markov-dependent models. It supports waiting times, pattern counts, scan statistics, longest runs, numbers of runs, matching probabilities, and Cochran-type testing.

The app is intended for students learning probability, researchers developing exact methods, and practitioners who need interpretable alternatives to simulation or large-sample approximations.

Each module guides the user from model specification to an exact probability, distribution, or testing result.

1

Define the event

Specify the run, pattern, window, match, or test statistic of interest.

2

Choose a model

Use independent Bernoulli trials or a Markov-dependent sequence where supported.

3

Build finite states

Track only the sequence information needed to determine progress toward the event.

4

Compute exactly

Propagate state probabilities to obtain the requested distribution or tail probability.

Powerful Tools in One App

Choose a module below to get started. Each tool includes detailed instructions and examples.

Waiting Time

Probability that the waiting time for a pattern occurrence exceeds n.

Learn more

Number of Patterns

Probability calculations for the number of pattern occurrences.

Learn more

Scan Statistic

Exact probabilities for scan statistics in binary sequences.

Learn more

Longest Run

Distribution calculations for the longest run of a selected state.

Learn more

Number of Runs

Distribution calculations for the number of success runs, failure runs, or total runs.

Learn more

Matching Probability

Probability calculations for matching patterns between two sequences.

Learn more

Cochran's Test

Exact p-value, type I error, and type II error calculations for Cochran-type testing.

Learn more
Applications

Where finite Markov chain imbedding is useful

FMCI is especially valuable when the order and local structure of observations matter and an exact finite-sample probability is preferred over an approximation.

Statistical process monitoring

Runs and scan statistics can detect sustained shifts, clustering, or unusual local concentrations in process observations while preserving exact finite-sample probabilities.

Longest RunScan StatisticNumber of Runs

Genomic sequences and CNV analysis

Binary or categorized genomic measurements can be studied for unusually long segments, clustered signals, recurring patterns, or regions associated with copy-number variation (CNV).

Scan StatisticLongest RunNumber of Patterns

Reliability and consecutive events

Runs represent consecutive successes or failures, making FMCI useful for reliability systems, alarm sequences, streaks, and threshold rules based on repeated events.

Longest RunNumber of RunsWaiting Time

Sequence agreement and matching

Exact matching probabilities help quantify agreement, coincidence, or aligned similarities between two binary sequences under specified dependence assumptions.

Matching Probability

Exact testing and experimental analysis

Finite-state calculations can deliver exact p-values and error probabilities when asymptotic approximations may be unreliable, including Cochran-type procedures.

Cochran's Test
Help

Common issues

The app does not open: the hosting address may be unavailable or the MATLAB Web App Server may be offline. Contact the maintainer using the email address shown here.

An input is rejected: verify the module guide, parameter ranges, dimensions of transition matrices, and the relationship among sequence length, run length, and window size.

The result is unexpected: confirm whether the selected model is independent or Markov-dependent and whether the requested result is a point, cumulative, or tail probability.

App launches: