#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

# 2X2 Bayesian Contingency tables, which sampling plan do I use?

Hi!  I am a jasp and statistics beginner, so I am hoping to find some help here.

I'm using JASP to run 2X2 Bayesian Contingency analyses on my data and I am not sure which of the sampling plans to use for my analysis.

I have one independent categorical variable to which participants are randomly assigned (75 paticipants divided in a group of 40 and 35 people) and one dependent categorical variable (change of belief 0 or 1), hence the 2X2 analysis.

Currently my tendency is to select Indep. multionomial, rows (?) fixed.

Emily

• It sounds to me that you want to assess a "2X2" "contingency." If that's the case then the appropriate Bayesian analysis in JASP would be: "Frequency"/"Bayesian"/"Contingency Tables".

R

• Thanks for your answer! But that’s what I am doing right now, I am just not sure which sampling plan I need to choose.

• The manual at http://static.jasp-stats.org/Manuals/Bayesian_Guide_v0_12_2_1.pdf describes how to tell JASP what sampling plan you've (already) used to collect your data. The relevant text is copied below. Thus, from what you've described, it appears that you did NOT conduct "Independent multinomial sampling" or "Hypergeometric sampling." That leaves as possibilities "Joint multinomial sampling" if you determined what your total sample size would be prior to collecting your data, "Poisson sampling" if the sample size was not fixed ahead of time.

----------

"There are 4 methods for determining the Bayes factors based on the sampling plan of the research

design. Consider a researcher wants to collect data on tennis players referred to a physiotherapist for

ankle injuries and is interested to see if there is a link between the player's gender and whether they

Poisson sampling:

The sampling scheme is to collect data for a six-month period. There is, therefore, no restriction on

the cell counts, the cell and grand total counts will be random. Each cell count will have a Poisson

distribution.

Joint multinomial sampling:

In this case, data will only be collected for the first 100 players referred to the physiotherapist. This is

like the Poisson scheme except that the grand total is now fixed.

Independent multinomial sampling

In this case, data will be collected from 50 male and 50 female players. Therefore, either the rows or

columns are fixed and therefore multinomially distributed.

Hypergeometric sampling

Such a sampling system is rarely applied. In this case, data is collected such that BOTH columns AND

rows are fixed. This can also be used when two continuous variables are split by their median values

i.e. median split on age (old-young) and height (small-tall).

When running the Bayesian contingency table analysis, it is important that the correct sampling

scheme is selected in the options."

R

• I think this is independent multinomial sampling. However, I would suggest that instead you use the Bayesian A/B test (also in JASP). Some relevant references with discussion:

There are also a number of "rejected" papers on my website (reanalyses sent to medical journals) -- see the top of http://www.ejwagenmakers.com/papers.html.

Cheers,

E.J.

• If Bayesian contingency table analysis is to be used, then in order for it to be "Independent multinomial sampling" as described in the JASP manual, for one of the two variables, an equal number of individuals would need sampled from each category (the manual says "Independent multinomial sampling In this case, data will be collected from 50 male and 50 female players. Therefore, either the rows or columns are fixed and therefore multinomially distributed").

However, in the present situation, the two categories formed by the independent variable have unequal (40 and 35) rather than equal numbers, and the "dependent variable" is free to vary across the "0" and "1" categories. Therefore the present sampling plan cannot count as what the JASP manual describes as "Independent multinomial sampling."

R

• The equality of sample sizes is coincidental! The important aspect is that it is fixed by design and not random.

EJ

• edited August 2023

But presumably the study was not designed to have "40" in one group and "35" in the other. Instead (presumably) that's just how many happen to have been sampled from each of the two categories. Therefore neither the row counts nor column counts are fixed-by-design, and thus don't conform to the stated "Independent-multinomial-sampling" requirement that "either the rows or columns are fixed." An additional reference for the definition is here: https://online.stat.psu.edu/stat504/book/export/html/693#:~:text=Product%20Multinomial%20Sampling&text=Hence%2C%20one%20margin%20is%20fixed,case%20of%20independent%20multinomial%20sampling.

R