# Probability

**Probability** in mahjong is a concept that can be applied to many different situations. Because unlike chess, go or shogi, mahjong is an incomplete-information game. Players are required to predict outcomes and chances of reaching tenpai, improving their hand state (lowering tenpai or raising uke-ire (the useful tile count)), and completing their hand. At the same time, players try to project and guess opponent waiting tiles. Naturally, some of these are difficult concepts to describe with mathematical models, due to various game situations.

## Contents

- 1 Basic concepts and variables
- 1.1 Chance of any given tile occuring once
- 1.2 Chance of a subset of tiles occuring once
- 1.3 Chance of drawing from a subset (tsumo chance)
- 1.4 Chance of calling a final tile from a subset (ron chance)
- 1.5 Chance of winning (raw chance, at tenpai stage)
- 1.6 Chance of not having a win declared in one full turn
- 1.7 Chance of winning (net chance)

## Basic concepts and variables

- A, B, C, D as indices: for player 1, 2, 3, 4.
- E as index: total for everyone.
- X as index: explanatory concept.
- X, Y, Z as indices: the three-tile indices for a function requiring inputs from 2-shanten or better.
- numCopies: The number of copies of any given tile.
- remTiles: The number of tiles remaining in a game. Equal to 136 - 1 - discardPonds - hand
_{E}- 3 * calls - 2 * kans; as the number of kans reveal an extra tile for the group and an extra tile in the dead wall. This concept may be different according to the perspective of who is counting. A single player may not know that his opponents may have all his tiles buried in his hand. - remDraws
_{X}: The number of draws left for a given player, or the entire table.

### Chance of any given tile occuring once

P(tile) = numCopies(tile) / remTiles

### Chance of a subset of tiles occuring once

{Sum: (tile=0 to 33)} numCopies(tile) / remTiles

### Chance of drawing from a subset (tsumo chance)

S = 1 - notS; notS = ({Sum: (tile=0 to 33)} numCopies(tile) / remTiles)^{remDrawsE}

### Chance of calling a final tile from a subset (ron chance)

R = 1 - notR; notR = ({Sum: (tile=0 to 33)} numCopies(tile) / remTiles)^{(remDrawsE - remDrawsX)}

### Chance of winning (raw chance, at tenpai stage)

W = 1 - (notS * notR); note that raw chance will give numbers whose 4-player total can easily exceed a total probability of 1. This is to be expected.

### Chance of not having a win declared in one full turn

Q = notW_{A} * notW_{B} * notW_{C} * notW_{D}

### Chance of winning (net chance)

N = W_{A} + {Sum: (i=1 to remDraws_{A})} [ W_{A} * Q^{i} ]

+ if(remDraws_{E} - 4 * remDraws_{A} >= 1;1;0) * notW_{A} * notW_{B} * Q^{remDrawsA}

+ if(remDraws_{E} - 4 * remDraws_{A} >= 2;1;0) * notW_{A} * notW_{B} * notW_{C} * Q^{remDrawsA}

+ if(remDraws_{E} - 4 * remDraws_{A} >= 3;1;0) * Q * Q^{remDrawsA}