Lecture 3 - Binary outcomes Flashcards
For a binary outcome you can calculate:
* probability of observing an event, e.g. probability of rolling a 6.
* odds of observing an event, e.g. odds of rolling a 6.
Describe how probability and odds of rolling a 6 is calculated.
- probability = p= 1/6 (there are 6 outcomes and rolling a 6 is one of them)
- odds = p / (1-p) = (1/6) / (1-(1/6)) = 1/5
Chi2-test
What is it used for?
Used for categorical data to determine whether your categorical data significantly deviates from what was expected.
Chi2-test
What assumptions need to be met?
- Both variables are nominally measured.
- The dependent variable is categorical.
- ≤ 20% of the cells with the expected values can be ≤5
- No cell has values ≤1
Chi2-test
How is significance determined?
When the test statistic x^2 ≥ the critical value (found by looking up the significance level (α) and the degrees of freedom in a table).
Chi2-test
What do you do if the assumption that no cell has values below 1 is violated?
Use Fisher’s exact test
How to calculate degrees of freedom?
Df = (amount of rows - 1)* (amount of columns - 1)
What should you do if the amount of degrees of freedom is equal to 1?
A continuity correction by ‘pulling’ the actual value (werkelijke waarde W) 0.5 points closer to the expected value (verwachte waarde V):
* if W is smaller then V -> + 0.5
* if W is bigger then V -> -0.5
Logistic regression
For what is it used?
Used for studying whether a dichotomous dependent variable is associated with 1 or more predictors.
Logistic regression
What assumptions need to be met?
- Independency of observations. This model cannot be used to research data of repeated measurements in time.
- No multicollinearity
- Linearity of independent variables (i.e. predictors) and log odds
Logistic regression
Describe the general formula of logistic regression.
ln(odds) = b0 + b1* X
Logistic regression
Given the general formula ln(odds) = b0 + b1 * X, how can you calculate:
* odds to experience certain event
* probability to experience certain event
* How much do the odds increase/decrease if X increases with 5?
* 95% CI for the increase in X with 5
- odds to experience certain event = exp(ln(odds))
- probability to experience certain event = odds/(1+odds)
- How much do the odds increase/decrease if X increases with 5? = e^(5xb0)
- 95% CI for the increase in X with 5 = e^5(b0 +/- 1.96 x SE)