stats Flashcards
probability: permutation with repetition. def and formula
order does not matter. n**p
probability: permutation without repetition. def and formula
If we have n items total and want to pick p in a certain order. n!/(n - p)!
probability: combination with repetition. def and formula
order does not matter. (n + p - 1)! / p!(n-1)!
probability: combination without repetition. def and formula
n!/((p)!(n - p)!)
Type I error in hypothesis testing
when we reject a true null hypothesis. False positive. Caused by researchers not choosing correct significance level
Type 2 error hypothesis testing
when we accept a false null hypothesis. False negative.. Caused by sample size and sigma
probability of making type 2 error in hypothesis testing
beta.
probability of rejecting a false null hypothesis (power of the test)
1 - beta, where beta is prob of making type 2 error. power of test can be increased by bigger sample size
Z-score in hypothesis testing
standardized variable obtained := (sample mean - pop mean) / standard_error
critical value in hypothesis testing
value from z-table or t-table for given significance and sample size
reject null hypothesis based on z/t score
if abs(score) > critical value
reject null hypothesis based on pvalue
pvalue < level of significance
pvalue formula and interpretation
p = sides * (1 - stats.t.cdf((1+confidence)/2, len(arr)-1)
pvalue is the probability that we observe our sample dataset if the null hypothesis is true
industry standard for t/zscore for rejecting
> 2
industry standard for sample size where t-test and z-test can be used interchangeably
n > 50