1/123
I can do it!!!!
what is the real world problem we encounter when dealing with true population mean?
we will never know the true value
define what equation this is and then tell me what each of the variables are in this equation
is is the confidence interval
x bar: sample mean
z : z-value, we get through how much confidence we set (ex. 95%, 99%)
sigma: the standard deviation of the population which we get through the expert
n : # of observation in the sample

when we look at the letter z, what do we presume?
z is for normal distribution, otherwise known as a normal bell curve
how to we get the z value 1.96 or any z value for that matter in R?
qnorm(0.0025)
qnorm(0.975)
or
qnorm(c(0.025, 0.975)
which yields -1.96 & 1.96
what is mu?
mu is the true population mean
how do we interpret the confidence interval?
for every 100 random samples of the sample population, 95 of the sample confidence intervals will include the true population mean (mu)
what is alpha?
100 - confidence
define alpha
it is the chance in which we missed the mu
the more confidence you are, the ______ the alpha
smaller
two -sided confidence interval cue words
“between this # and this #”
one-sided confidence interval cue words
“larger than”, “less than”, no more than”
how does a two sided confidence interval equation look like?

what happens to the confidence interval when we increase sample mean?
the confidence interval moves to the right
what happens to the confidence interval when we decrease sample mean?
the confidence interval moves to the left
what happens to the confidence interval when we increase alpha
the confidence interval becomes narrower
what happens to the confidence interval when we decrease alpha
the confidence interval becomes wider
what happens to the confidence interval when we increase the population standard deviation
the confidence interval becomes wider
what happens to the confidence interval when we decrease the population standard deviation
the confience interval becomes narrower
what happens to the confidence interval when we increase the sample population?
the confidence interval gets narrower
what happens to the confidence interval when we decrease the sample population
the confidence interval becomes wider
what happens when we don;t have sigma or the population standard mean?
we use t-intervals
what does the s stand for in the t interval equation?
sample standard deviation
the higher the degrees of freedom, t gets closer and closer to ___________?
normal distribution or (z)
how to we calculate degrees of freedom?
dof = n - 1
where do we get empirical distributions?
straight from data, observations in the real world
what is a theoretical distribution?
all possible outcomes from the data, we will never see this in the real world
what is the first thing we do when we sort out out the empirical data?
we check for normality!
what are the four ways we can assess for normality for empirical data?
histogram
when performing a shapiro-wilkes test, what do we consider normal?
p > 0.05, then normal
0 < 0.05, then not normal
when performing skewness, what is wininger’s rule of thumb?
-0.3 < s < 0.3 or -0.5 < s < 0.5
then normal
what do we consider normal data or normality?
a regular bell curve!
1sd —> 65%
2sd —> 95%
3sd —> 99%
what is the difference between theoretical distributions and empirical distributions?
theoretical distributions yield the same every time while empirical distributions do not
what is discrete data?
we are counting, no decimals
what is continuous data
measuring, measurement units
know the difference between left and right skewed
what are examples of left skewed data
hearing quality
blood oxygenation
what is an exmaple of right skewed data?
income
body weight
how do we know if we need to perform a poisson test for testing normality?
rate!!!! rate data!!!
in R, how do we conduct a poisson test?
ppois( 11, 50 × 0.2)
in R, how do we conduct a binomial test?
pbinom( 11, 50, 0.2)
draw out the chart for determining which test we should decided based on the data
standard normal, normal, poisson, uniform, binomial
no we are talking about sampling distributions
the more samples we do, the ______ the sampling distribution mean.
taller
the larger samplings we conduct the _____ ______ sampling distribution mean.
more convergent
in R, when we want to do a bunch of sampling distributions, how would we code that?
replicate( 1000, mean(sample, univ, 10, replace = T)
and the more samples we conduct for theoretical distributions… what happens?
you would eventually converge to the true population mean
what are the 3 configurations of the central limit theorem
the more samples you do, the more normal the distribution becomes
the mean of the sampling distribution is mu
sd of distribution is sigma/ sq rt of n
when we want to get the probability of area under a curve, what function do we use?
pnorm(z value)
ex. pnorm(-3.11)
when we want to get probability of an area under the curve using t interval, what function do we use?
qt( z value, dof = n-1)
ex. qt(-2.55, 19)
steps for yielding p value
calculate t statistic
plug into theoretical distribution
yields p value
interpret p value
if less then 0.05, different, if more than 0.05 fine
what is the scale function in R?
the scale function is use to find outliers in our data
what is the syntax of the scale function in R?
scale (x)
which(abs(scale(x) > 3)))
what is computer zero
such a tiny number
n = (z x sigma/ x bar = mu)²
know what happens to n when we manipulate each of the variables
why is this important in science???
it’s what drives grant proposals
when do we use critical values
we use critical values when determining if two distributions are different or not different

when we manipulate each of these variables, what happens?
if the t value is inside the zone, what do we do?
we reject, it is not different
if the t value is outside the zone, what do we do?
we accept, it is different
true or false: H0 + HA = 1
true
the alternative hypothesis is always towards the disparity
true
the null hypothesis is always no disparity
true
comparing the t value against the critical value is the same as ….
comparing p value against alpha
different means the test is
two sided
larger than or smarter than or smaller than means the t-test is
one-sided t test
type II error
fail to reject the null when it is actually false
type 1 error (alpha)
reject the null when it is actually true
to fix the type II error, how can we manipulate the data?
increase n, or decrease the sigma (standard deviation of the population)
how do we calculate power?
1 - beta
if we manipulate the variables in this equation, what happens to n?

what is the sample size that get's us closest to a normal distribution of a t value for a normal distribution
27
the larger the sample size, the ,pre close the t value is to….
1.96 or normal distribution
hazard ratios
we yield unity or 1, null is unity
discrepancy
a-b = , null is 0
how do we know whether to reject or not reject the null
if 1 is included in the confidence interval
HR = 0.68, CI(0.43, 1.09)
do we reject or not reject the null
1 is part of the confidence interval so we cannot reject because it is a plausible value
HR = 0.48, CI(0.29, 0.80)
do we reject or not reject the null value
we reject the null because the null value (1) for hazard ratios is not included in the confidence interval, therefore, the p value is highly significant
any study with a large enough sample size (n) can do what to the p value?
it’ll make the p value really small
shapiro-wilkes test only works between what sample sizes?
what is the alternative?
3-5000
skewness
here is a confidence interval (920-1087)
1004 is the mean
is the p value greater than or less than 0.05
the p value is greater then 0.05 because the mean is in the confidence interval, therefore, there is no significant difference
default t test in R is paired or unpaired/
defualt is unpaired
paired =TRUE to make sure it is a paired t-test
with paired data you are testing
mean difference for paired t-test
in R how to we decipher if it is a one-paired or two-paired t-test?
mean of X → unpaired
mean difference —> paired
if you have equal variance what is your dof?
it yields an integer
if you have unequal variance in t -tests what is the dof
non-integer
can pairs happen through unpaired data?
yes it is called propensity matching
in R, what function do we use for propensity matching and what does propensity matching do?
matchit(x) via MatchIt package
what is power?
ability to see a difference when there is one, think microscope
paired examples for one-one mapping
doctor and patient, driver and passenger, twins
t.test(y ~ x): which is dependent and independent and which one is categorical and numerical?
y: dependent, numerical
x: independent, categorical
paired lengths always have to…?
they always have to match
in R, how do we conduct an ANOVA test?
summary(aov(x))
anova yields what values?
yields an F value and a P value
we use anova when there are….
multiple groups
you can use anova for 2 groups but usually for three or more
when we use anova for normality, what do we use?
we look at the residuals
for testing variance using anova, what test do we conduct?
we use the bartlett test
bartlett.test for variance
in anova, if we get a large F value what happens
we reject the null hypothesis
in anova, if we get a small F value, what do we do?
we fail to reject the null hypothesis
what is the problem with anova?
anova tells us if there’s a difference or no difference, but it does not tell you which group is different
what is important to know about anova in relation to degrees of freedom?
F value is indexed by 2 dof,
k-1
n-k
what tests can we conduct to determine which group is different after we conduct an anova test
pairwise.t.test ( data , groups)
tukeyHSD
what is the the problem with finding out which group is different after conducting the ANOVA test
it leaves a lot of room for a type 1 error