# transition_probability: State Transition Probability In PACBO: Clustering Online Datasets

## Description

This function computes the transition probability from current state x to the proposal state z belonging to the neighbor of x (i.e., z \in {x-1, x, x+1}).

## Usage

 1 transition_probability(x, z, K_max, prob = 1/3) 

## Arguments

 x positive integer indicating the current state. z positive integer indicating the proposal state. K_max positive integer indicating the maximum value allowed for x and z. prob probability of jumping from state x to state x if x doesn't equal to K_max nor 1.

## Details

This function computes the transition probability from current state x to the proposal state z. If x doesn't equal to K_max nor 1 and z belongs to the neighbor of x (i.e., x-1,x,x+1), then the transition probability is prob, else 0. If x equals to 1 or K_max, then the transition probability from x to z belongs to 1,2 or K_max-1, K_max is 0.5, else 0.

## Value

A transition probability from state x to state z.

## Examples

 1 transition_probability(2, 3, 50, 1/3) 

PACBO documentation built on May 2, 2019, 2:05 a.m.