## Mutual Information Calculator

by  Larry Yaeger

### Basic use

This page makes it easy to calculate Mutual Information between pairs of signals (random variables). Enter as many signals as you like, one signal per line, in the text area below. The number of values must be the same in all signals. Click "Submit" to perform the calculation and see the results on a new page.

### Signal naming

You may name the signals with leading text followed by a colon (:). Unnamed signals will be assigned names of a, b, c, etc.

A typical unnamed signal might look like:

```   0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 ```
A typical named signal, named "x" here, might look like:

```   x: a a a a a b b b b b a a a a a ```

### What is calculated?

Mutual Information (MI) will be calculated for each pair of signals (unless the "Avoid related pairs" option is checked; see "Options" below). In addition to MI, you will see the following quantities (where 'N' stands for normalized):

```   H(x)    = Entropy of signal x   NMI_max = MI(x,y) /     max( H(x) , H(y) )   NMI_avg = MI(x,y) / [0.5 * ( H(x) + H(y) )]   NMI_sqr = MI(x,y) /    sqrt( H(x) * H(y) )   NMI_min = MI(x,y) /     min( H(x) , H(y) )   NMI_pow = MI(x,y) /      2^( H(x) + H(y) ) ```

### Options

If you name the signals yourself and there are families of signals you do NOT want to be paired with each other, you can check the "Avoid related pairs" option. This would be useful if you wanted to specify, for example, signals x1, x2, x3, y1, y2, y3, but only see pairs of x# and y# signals (avoiding (x1,x2), (y1,y2), etc.). Signals are considered related if they have the same first character.

If you are performing the calculation for many signals you may also want to check the "Succinct output" option. This will collapse all output to a single, fixed-width line to make it easier to read the results from multiple signal pairs.

Avoid related pairs
Succinct output

Enter signals here...