Back to book

Finding the strength of evidence with the likelihood

This page will give you the means for performing simple likelihood analyses. You should read Chapter Five of Understanding psychology as a science first before using this page. Chapter Five provides definitions, explanations and details. Once Chapter Five is read, this page can be used by students, course instructors, and researchers to get the most out of their data. (And put difficult journal reviewers in their place - just how strong really is the evidence for one value over another? What really follows from a "null" result?) See Baguley and Kaye (2010) for corresponding R code. John Christie has also provided R code for the calculators below, modified so that they run more efficiently.

See also : Dienes, Z. (2011). Bayesian versus Orthodox statistics: Which side are you on? Perspectives on Psychological Sciences, 6(3), 274-290.

A. Program for proportion
B. Program for 2X2 cross classification
C. Program for mean of normal with unknown variance
D. Program for between-subjects contrasts

 

A. Program for proportion

This flash program asks for the number of successes and the number of failures. The program returns the maximum likelihood population proportion and the 1/8 and 1/32 likelihood intervals. The program also asks you to input the proportion assumed by two hypotheses; it returns the likelihood ratio for these two values. This ratio could be used as a stopping rule: Collect data until the ratio is greater than 8 or less than 1/8, for example.

Click here for corresponding Matlab code.


B. Program for 2X2 cross classification.

For the general case with cell counts a, b, c, d:

 

success

fail

Type X

a

b

Type Y

c

d

The choice between the following two programs is just a matter of convenience:

Ratio of probabilities (assumes both 'b' and 'd' are non-zero):

We are interested in the extent to which θ1 (theta1) (the probability of success for type X individuals) is different from θ1 (theta2) (the probability of  success for type Y individuals), as measured by the ratio γ (gamma) =  θ1 /θ2.  This flash program asks for the values of each of a, b, c, and d: Make sure you enter them in that order. The program will tell you the maximum likelihood value of gamma and its 1/8 and 1/32 likelihood intervals. The program also asks you to input the gamma assumed by two hypotheses; it returns the likelihood ratio for these two values. This ratio could be used as a stopping rule: Collect data until the ratio is greater than 8 or less than 1/8, for example.

Click here for corresponding Matlab code.

Odds ratio:

We are interested in the extent to which θ1 (theta1) (the probability of success for type X individuals) is different from θ1 (theta2) (the probability of  success for type Y individuals), as measured by the odds ratio Ψ (psi) =  θ1(1- θ2) /θ2(1 - θ1). θ1/(1 - θ1) are the odds in favour of X happening, and Ψ is the ratio of the odds for X over the odds for Y. If there is no relation between success and type, the odds ratio will be 1 . This flash program asks for the values of each of a, b, c, and d: Make sure you enter them in that order. The program will tell you the maximum likelihood value of psi and its 1/8 and 1/32 likelihood intervals. The program also asks you to input the psi assumed by two hypotheses; it returns the likelihood ratio for these two values. This likelihood ratio could be used as a stopping rule: Collect data until the likelihood ratio is greater than 8 or less than 1/8, for example.

Click here for corresponding Matlab code.

 

C. Program for mean of normal with unknown variance

This flash program asks for the sample  standard error, mean, and number of subjects. The program tells you the maximum likelihood mean and its 1/8 and 1/32 likelihood intervals. The program also asks you to input the mean assumed by two hypotheses; it returns the likelihood ratio for these two values. This ratio could be used as a stopping rule: Collect data until the ratio is greater than 8 or less than 1/8, for example.

Click here for corresponding Matlab code.

 

D. Program for between-subjects contrasts

Imagine you have k groups of subjects each with mean mi and standard deviation SDi of a roughly normally distributed variable. The contrast, C =  ∑ai*mi where ai are the contrast weights. For roughly normally distributed data and equal variances within each group, the mean contrast value C has a standard error √(∑ai*ai)*SDp/√n where n is the number of subjects in each group and SDp = √(1/k*∑SDi*SDi).  The degrees of freedom are ∑(ni -1). If the number of subjects in each group are unequal, use the harmonic mean for n (= k/(∑1/ni). See Box 3.7 of chapter three for explanation of what a contrast is.

This flash program asks for the standard error of the contrast, mean of the contrast, and the degrees of freedom. The program tells you the maximum likelihood value of the contrast and its 1/8 and 1/32 likelihood intervals. The program also asks you to input the value of the contrast assumed by two hypotheses; it returns the likelihood ratio for these two values. This ratio could be used as a stopping rule: Collect data until the ratio is greater than 8 or less than 1/8, for example.

Click here for corresponding Matlab code.

Thanks to Online Experiments for providing the Flash conversions of my Matlab. Use them for convenient programming of all your experiments!