Binary data Flashcards
Binary data
Categorical usually only two answers ie yes/no, o patients possess attributes or not
NB continuous data can be crudely mapped as binary.
Ordinal variable
If large enough with multiple categories can be analysed as continuous variable but require specialist stats. Clear ordering ie tumor stage
π
Proportion of population possessing the attribute hence proportion not possessing attribute = 1-π
Estimating π
π = r/n Analogous to u
r = possession of attribute n = population
Why new methods for categorical data
Continuous data varies by o around a mean u. Any value of u can vary by a range described by o. In categorical data there is only one parameter.
SE error is used. Once π has been estimated there is no need for further estimate of the spread of data
SE continuous variables
SE = σ/√n
SE binary variables
SE = √[π(1-π)/n]. Still infers that the larger the sample the smaller the error. This can give CI
χ2 test
Binary equivalent of the unpaired t-test ie A=B
Must be performed on independent counts
What needs to be calculated in χ2 test
Margins = these are subtotals of the categories. Both sets sum to the total in bottom right corner
Always draw 2x2 table
Expected values = always should add up to the margins despite sometimes not being whole numbers
K
Estimate of the proportion similar to both groups
χ2 test
Sum of ((O-E)/E)2
Ie difference between observed - expected/ expected squared
P value from χ2 test
Asymptomatic approximation
When is Fischers exact test used
When expected values <5
NB For larger tables the rule is that if over 20% of the
cells have expected values below 5, or any cells with expected values below 1 then the χ2 method may be unreliable
Fischers exact test
Calculates the p-value directly from data all possibilities for analysis are enumerated in tables. Margins ie p values from all possibles should add up to 1
Pitfalls for χ2 test
Tables must compare raw counts not proportions/percentages as they don’t give indication of sample size
Independent entities ie school children walking to school. Ensure bottom right number = no independent units