0% found this document useful (0 votes)
4 views

Biostatistics Hw

Biostatistics Hw

Uploaded by

kevin wabwile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Biostatistics Hw

Biostatistics Hw

Uploaded by

kevin wabwile
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Biostatistics Hw

Q1

a. Compute a 90% CI for the change in blood pressure.

First, calculate the t× at Alpha=0.10

Degree of freedom, df=n−1=15−1=14

Critical value, t×=T.INV.2T(0.10, 14)=1.761 [Using the excel function]

Now substitute the value in the formula: X diff ±t∗(√ )


sd
n
=2.067 ± 1.761∗
( 2.219
√ 15 )
¿ 2.067 ± 1.009
Thus, the 90% confidence interval for the change in blood pressure is (1.058,3.076).

b. Compute a 99.9% CI for the change in blood pressure.

First, calculate the t× at Alpha=0.001

Degree of freedom, df=n−1=15−1=14

Critical value, t×=T.INV.2T(0.001, 14)=4.140 [Using the excel function]

Now substitute the value in the formula: X diff ±t∗(√ )


sd
n
=2.067 ± 4.140∗
( 2.219
√15 )
¿ 2.067 ± 2.372
Thus, the 99.9% confidence interval for the change in blood pressure is (-0.305,4.439).

c). The 90% confidence interval, (1.058, 3.076) doesn't contain the value 0; Therefore, the two groups
before medication and after the medication is statistically significant.

The 99.9% confidence interval, (-0.305,4.439) contains the value 0; Therefore, the two groups before
medication and after the medication is NOT statistically significant.

d.)

H 0 : μd =0

H 0 : μd ≠ 0

Let α =0.10
So, test statistic t:

2.067
t=
2.219
√15
2.067
¿
0.5729
¿ 3.61
p-value = =T.DIST.2T(3.61,14) = 0.002841

Since p value is less than significance value, therefore reject the null hypothesis.

e.)

H 0 : μd =0

H 0 : μd ≠ 0

Let α =0. 01

So, test statistic t:

2.067
t=
2.219
√15
2.067
¿
0.5729
¿ 3.61
p-value = =T.DIST.2T(3.61,14) = 0.002841

Since p value is less than significance value, therefore reject the null hypothesis.

Q2

Let’s begin by first finding the mean and standard deviation:

Observations X X^2
1 5.5 30.25
2 5.1 26.01
3 6.5 42.25
4 5.2 27.04
5 6.4 40.96
6 6.2 38.44
7 5.9 34.81
Total 40.8 239.76

Sample mean =
∑ X i = 40.8/7 = 5.8286
n
Sample variance, s2 is:

( ( ))
n n 2
1 1
2
s=
n−1 ∑ Xi − 2
n ∑ Xi
i=1 i=1

( )
2
2 1 40.8
s= 239.76−
7−1 7
2
s =0.3257
So, sample standard deviation is

s= √ s2 =0.5707
a)

Hypothesis:

H 0 : μ=5.828571

H 1 : μ ≠ 5.828571

Test statistic, t

X−μ 0 5.8286−5.8286
t= = =0
s 0.5707
√n √7
Degrees of freedom = n-1 = 7-1 = 6

Critical value = 2.447

Since absolute value of test statistic is less than critical value, we fail to reject H0, at 5% level of
significance.

b)
Hypothesis:

H 0 : μ=5. 2

H 1 : μ ≠ 5. 2

Test statistic, t

X−μ 0 5.8286−5.2
t= = =2.914
s 0.5707
√n √7
Degrees of freedom = n-1 = 7-1 = 6

Critical value = 2.447

Since absolute value of test statistic is greater than critical value, we reject H0, at 5% level of
significance.

c)

Hypothesis:

H 0 : μ=5.2

H 1 : μ ≠ 5. 2

Test statistic, t

X−μ 0 5.8286−5.2
t= = =2.914
s 0.5707
√n √7
Degrees of freedom = n-1 = 7-1 = 6

Critical value at 1%= 3.707

Since absolute value of test statistic is less than critical value, we fail to reject H0, at 1% level of
significance.

d)

Changing alpha from 0.05 to 0.01 change the decision from rejection to non rejection of null hypothesis,
as changing alpha will change the critical value and also it makes the difference in comparing with P
value.

e)

Lower values of α make it harder to reject the null hypothesis.


3.

We want to test for the population mean so we use t-dist or normal. Since we have unknown population
SD and we assume that the data follows normal population we will use t-dist The assumption validates
the test since n < 30.

a)

We will use 'x' instead of 'y'.

The test is to check if the mean is 135 or not. So this is two tailed test

Ho = 135

H1≠ 135

n = 20 x =131.95 Sx =2.544

x−μ0
Test Stat = S x
√n
Where the null mean μ0 = 135

Test stat = -5.3616

b)

manually p-value =2 P( t n−1> ¿Test Stat |) .............using t-dist tables

=2P(t19 > 5.36)

=2 *1.7837E-05

p-value = 3.5675E-05 = 0.00003

In R: pt(5.3616, 19, lower.tail = FALSE) *2

p-value is the prob of getting as extreme (less than or greater than) as the sample mean using the null
mean as true pop mean.

c)

Yes p-value < 0.001

d)

This is important because this lower than the minimum level of acceptance of the null hypo. Hence now

we would reject the null hypothesis at 0.1%. There is sufficient evidence to conclude that the true
mean is not 135.
e)

We reject the null hypo when

p-value <=

So the smallest value of will be p-value obtained

= 3.5675E-05 = 0.00003

This is not standard since generally it is fixed between 1% to 10%.

Smaller than this say 0.00002 would make p-value greater and we will not be able to reject the null.

f)

As long as p-value <= , we would reject the null.

So it is valid for = 0.1, 0.05, 0.01, 0.001

But = 0.0000001 is smaller than p-value hence

we would not reject the null hypo at 0.0000001

Q4

Rule for rejecting null hypothesis:-

1)If hypothesized population mean value is lies between confidence interval then null hypothesis is
not rejected.

2)If hypothesized population mean value is lies outside from the confidence interval then null
hypothesis is rejected.

a) Confidence interval does not contain μ = -27. Therefore, reject null hypothesis.

b) Confidence interval does not contain hypothesized mean value ( μ=-8). Therefore, reject null
hypothesis.

c) Since the confidence interval contain hypothesized mean value ( μ=−14 ¿, so we fail the reject null
hypothesis.

Q5

In statistical hypothesis testing a type I error is the rejection of a true null hypothesis, while a type II
error is the non-rejection of a false null hypothesis.

a. Here we rejected the null hypothesis, which might be true hence it is Type I Error
b. Here we failed to reject the null hypothesis which might be false, hence it is Type II Error.

Q6

a) Type I error = \alpha. If we make \alpha too big, the Type I error will increase and Type I error would
be more likely.

b) If we make \alpha too small, the type I error will decrease and Type II error will increase. Thus, Type II
error would be more likely.

You might also like