Professional Documents
Culture Documents
STATISTICS
Prepared By:
Ma. Cristina S. Severino – Perocho
MAEd E –II
Experiment:
Normal night sleep
24 hrs. No sleep Perform a task
Perform a task 15 students
15 students = 90 points
= 78 points
S c ie n t if ic k n o w le d g e
R e a s o n a n d i n t u it io n E m p ir i c a l o b s e r v a t i o n
Systematic error
Q The table above is interesting: look at the values of the mean X. The
everage (mean) of these means is 3.2. Thus, although the mean of a
particular sample may not be a good predictor of the population mean, we
get better results if we take the mean of a whole bunch of sample means.
A You have put your thumb on one of the most important concepts
inferential statistics; the values of are values of a random variable (take
a sample of 5, and measure the mean), and its probability distribution is
called the sampling distribution of the sample mean. The above table
suggests that the expected value of the sampling distribution of the mean is
the same as the population mean, and this turns out to be true.
Sampling Distributions
Computing a Sampling Distribution by Hand
An unfair coin has a 75% chance of landing heads-up. Let X = 1 if it lands
heads-up, and X = 0 if it lands tails-up. Find the sampling distribution of
the mean for samples of size 3.
Outcome HHH HHT HTH HTT THH THT TTH TTT
Probability
X
Sampling Distributions
Solution The experiment consists of tossing a coin 3 times and
measuring the sample mean The following table shows the collection
.
learning objectives:
HA :
H0 :
Testing of hypotheses
Definition of p-value.
90
2.5% 95% 2.5%
80
70
60
50
40
30
20
10
0
23.8 28.8 33.8 38.8 43.8 48.8 53.8 58.8
AGE
If our observed age value lies outside the green lines, the probability
of getting a value as extreme as this if the null hypothesis is true is
< 5%
Testing of hypotheses
Definition of p-value.
irreparable damage
treated but not harmed
would be done
by the treatment
•In hypothesis testing, the significance level is the criterion used for
rejecting the null hypothesis. The significance level is used in
hypothesis testing as follows: First, the difference between the results
of the experiment and the null hypothesis is determined. Then,
assuming the null hypothesis is true, the probability of a difference that
large or larger is computed . Finally, this probability is compared to the
significance level. If the probability is less than or equal to the
significance level, then the null hypothesis is rejected and the outcome
is said to be statistically significant. Traditionally, experimenters have
used either the 0.05 level (sometimes called the 5% level) or the 0.01
level (1% level), although the choice of levels is largely subjective. The
lower the significance level, the more the data must diverge from the
null hypothesis to be significant. Therefore, the 0.01 level is more
conservative than the 0.05 level. The Greek letter alpha (α) is
sometimes used to indicate the significance level.
POWER OF A TEST
Calculating The Power Of A Test
H0: mu = a,
Ha: mu not = a.
The power of a test is the probability that we can the reject null hypothesis
at a given mean that is away from the one specified in the null hypothesis.
We calculate this probability by first calculating the probability that we
accept the null hypothesis when we should not. This is the probability to
make a type II error. The power is the probability that we do not make a
type II error so we then take one minus the result to get the power.
We can fail to reject the null hypothesis if the sample happens to
be within the confidence interval we find when we assume that the
null hypothesis is true. To get the confidence interval we find the
margin of error and then add and subtract it to the proposed mean,
a, to get the confidence interval. We then turn around and assume
instead that the true mean is at a different, explicitly specified
level, and then find the probability a sample could be found within
the original confidence interval.
In this example, the power of the test is approximately 91.8%. If the true
mean differs from 5 by 1.5 then the probability that we will reject the null
hypothesis is approximately 91.8%.
Calculating The Power Using a
t Distribution
•Calculating the power when using a t-test is similar to using a
normal distribution. One difference is that we use the command
associated with the t-distribution rather than the normal
distribution. Here we repeat the test above, but we will assume that
we are working with a sample standard deviation rather than an
exact standard deviation. We will explore three different ways to
calculate the power of a test. The first method makes use of the
scheme many books recommend if you do not have the non-central
distribution available. The second does make use of the non-central
distribution, and the third makes use of a single command that will
do a lot of the work for us.
•In the example the hypothesis test is the same as above,
H0: mu = 5,
Ha: mu not = 5.
•Again we assume that the sample standard deviation is 2, and the
sample size is 20. We use a 95% confidence level and wish to find
the power to detect a true mean that differs from 5 by an amount of
1.5. The commands to find the confidence interval in R are the
following: > a <- 5
> s <- 2
> n <- 20
>error < qt(0.975,df=n1)*s/sqrt(n)
> left <- a-error
> right <- a+error
> left [1] 4.063971
> right [1] 5.936029
•The number of observations is large enough that the results are
quite close to those in the example using the normal distribution.
Next we find the t-scores for the left and right values assuming that
the true mean is 5+1.5=6.5:
> assumed <- a + 1.5
> tleft <- (left-assumed)/(s/sqrt(n))
> tright <- (right-assumed)/(s/sqrt(n))
> p <- pt(tright,df=n-1)-pt(tleft,df=n-1) > p
[1] 0.1112583
•The probability that we make a type II error if the true mean is 6.5
is approximately 11.1%. So the power of the test is 1-p:
•In this example, the power of the test is approximately 88.9%. If the
true mean differs from 5 by 1.5 then the probability that we will
reject the null hypothesis is approximately 88.9%. Note that the
power calculated for a normal distribution is slightly higher than for
this one calculated with the t-distribution.
•Another way to approximate the power is to make use of the non-
centrality parameter. The idea is that you give it the critical t scores and
the amount that the mean would be shifted if the alternate mean were
the true mean. This is the method that most books recommend.
> ncp <- 1.5/(s/sqrt(n))
> t <- qt(0.975,df=n-1)
> pt(t,df=n-1,ncp=ncp)-pt(-t,df=n-1,ncp=ncp)
[1] 0.1111522 >
1-(pt(t,df=n-1,ncp=ncp)-pt(-t,df=n-1,ncp=ncp))
[1] 0.8888478
learning objectives:
Multiple comparison
skewness skewness
kurtosis
kurtosis
God bless!*