Published data#
Published aggregate data used in the examples and tests.
These are the only human data shipped with the package; every value is taken from the source named and was checked against secondary reports.
CLINTON_GORE: Gallup poll, 6-7 September 1997 (Moore, 2002; analysed by Wang and Busemeyer, 2013): “Do you generally think [Bill Clinton / Al Gore] is honest and trustworthy?” Proportion yes: Clinton first 0.50, Gore first 0.68, Clinton second 0.57, Gore second 0.60.
Functions
Turn proportions into binary counts. |
- proportions_to_counts(props, n)[source]#
Turn proportions into binary counts.
Used to fit multinomial models when only proportions and a sample size are known.
- Parameters:
- Returns:
dict–{condition: [round(n p), n - round(n p)]}.
Examples
>>> from quantum_mind.data import proportions_to_counts >>> proportions_to_counts({'unknown': 0.36}, 98)['unknown'].tolist() [35, 63]