_images/calypso.png

Joint probability

This function provides joint distribution tables for X and Y, i.e. the probability of events defined in terms of both X and Y (per 1000) It can be applied for magnitude-direction, magnitude-period or period-direction

Parameters

magstr

Name of the column from which to get stats.

drrstr

Column name representing the directions. If method is Per Vs Dir or Mag vs Dir

periodstr

Column name representing the period. If method is Per Vs Dir or Mag vs Per

args: dict
Dictionnary with the folowing keys:
method: str

Name of the method to use, can be: Mag vs Dir: Plot Maginitude Versus Direction Per Vs Dir: Plot Period Versus Direction Mag vs Per: Plot Maginitude Versus Period

direction binning: str

Can be centered or not-centered depending if the directionnal are centered over 0

direction interval: int

Dirctionnal interval for the bins in degrees

folder out: str

Path to save the output

probablity expressed in: str

This can be percent or per thoushand

X Min Res Max(optional): list

Minimum, resolution and maximum value of X axis use in the join probability

Y Min Res Max(optional): list

Minimum, resolution and maximum value of Y axis use in the join probability

Time blocking: str
if Time blocking=='Annual',

Statistics will be calculated for the whole timeserie

if Time blocking=='Seasonal (South hemisphere)',

Statistics will be calculated for each South hemisphere seasons

if Time blocking=='Seasonal (North hemisphere)',

Statistics will be calculated for each North hemisphere seasons

if Time blocking=='Monthly',

Statistics will be calculated for each month

Examples:

>>> df=tf['test1']['dataframe'].Statistics.joint_probability(mag='U',drr='drr',args={'direction interval':45,Time blocking':'Yearly'})
>>> 

Outputs:

Joint probability example

January

0

1

2

3

Total

0

1

2

Total

100