Biostatistics Assignment: Hypothesis Testing and Data Analysis

Verified

Added on  2019/09/23

|5
|1172
|298
Report
AI Summary
The assignment is based on a biostatistics course and consists of five questions. Question 1 uses the binomial test to determine if there is a significant difference in the proportion of females and males, with the result showing no significant difference. Question 2 uses the Wilcoxon rank sum test to determine if there is a significant difference in MVPA hours between males and females, with the result showing no significant difference. Question 3 tests whether the concentration of PAH has decreased from introduction of new laws using a paired t-test. Question 4 uses chi-squared test to determine if sex and license status are independent of each other, with the result showing that they are independent. Question 5 calculates the required sample size for various studies based on desired standard deviation and margin of error.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Biostatistics Assignment 1
401077 Introduction to Biostatistics, Autumn 2018
Assignment 2
Question 1
a.
> table(survey$sex)
female male
121 150
> binom.test(121, 271,
+ 0.5,
+ alternative="two.sided",
+ conf.level=0.95)
Exact binomial test
data: 121 and 271
number of successes = 121, number of trials = 271, p-value = 0.08878
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.3863346 0.5078372
sample estimates:
probability of success
0.4464945
Point estimate = 0.4464945
95% Confidence interval (0.3863346 0.5078372)
b.
I am 95% confident that estimated population proportion of females lie in the
interval (0.39, .51). Mendenhall, W. M., Sincich, T. L., & Boudreau, N. S. (2016).
c.
Since confidence interval contains the value 0.50, I can say that 50% of 17-year-olds
in NSW are female.
Question 2
a.
> hist(survey$MVPA, col="green")
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Biostatistics Assignment 2
The distribution of MVPA is skewed to the right. This indicates there are very few
observations of large values of MVPA. Mendenhall, W. M., Sincich, T. L., & Boudreau,
N. S. (2016).
b.
Null hypothesis, ho: there is no significant difference in the average self-reported
hours of MVPA per week is equal between males and females.
Alternative hypothesis, h1: there is a significant difference in the average self-
reported hours of MVPA per week is equal between males and females.
> wilcox.test(survey$MVPA~survey$sex)
Wilcoxon rank sum test with continuity correction
data: survey$MVPA by survey$sex
W = 8539.5, p-value = 0.404
alternative hypothesis: true location shift is not equal to 0
with w=8539.5, p>5%, I fail to reject null hypothesis and conclude that there is no
significant difference in the average self-reported hours of MVPA per week is equal
between males and females. Tartakovsky, A., Nikiforov, I., & Basseville, M. (2014).
Question 3 (4 marks)
a.
Document Page
Biostatistics Assignment 3
Since the direction of hypothesis is given (decreased indicating right side), I can say
that this is a one (right) tailed hypothesis. The claim is to test if the concentration of
PAH has decreased from introduction of new law.
Let u1 and u2 be the mean concentration of PAH before and after introduction of
new laws. Statistically, I want to test if u1 > u2.
b.
The two samples of PAH concentration are dependent on each other as they are
measured in terms of before and after introduction of new laws. Hence to test the
significant difference in the means between two dependent samples, I use paired t
test. The test statistic for the same is given below. Tartakovsky, A., Nikiforov, I., &
Basseville, M. (2014).
T = udiff
s ddiff
( n )
Question 4
a.
Table 1: Sex & licence status
Female Male
Not Licensed 30 36
Learners
permit 41 42
Licensed 50 72
Table 2: Row percentage for Sex & licence status
Female Male
Not Licensed 0.45 0.55
Learners
permit 0.49 0.51
Licensed 0.41 0.59
> table <- table(survey$licence,survey$sex)
> table
female male
not licenced 30 36
learners permit 41 42
licenced 50 72
> prop.table(table,1)
female male
Document Page
Biostatistics Assignment 4
not licenced 0.4545455 0.5454545
learners permit 0.4939759 0.5060241
licenced 0.4098361 0.5901639
b.
From the table of row percentages, I observe that there is not much significant
difference in the percentage of gender for each type of licence status. This indicates
that licence status and sex are independent of each other.
c.
1. Both the variables ‘License Status’ and ‘Sex’ are measured by the nominal scale
of measurement. Hence I can say that 1st assumption of chi square analysis is
verified.
2. Since the cell frequency for each cell is greater than 5, I can say that 2nd
assumption of chi square analysis is verified.
d.
Step 1:
Null hypothesis, ho: Sex and License Status are independent of each other.
Alternative hypothesis, h1: Sex and License Status are dependent of each other.
Step 2:
Alpha = 5%
Step 3:
> chisq.test(table)
Pearson's Chi-squared test
data: table
X-squared = 1.4379, df = 2, p-value = 0.4873
Step 4:
Decision Rule: Reject null hypothesis if p-value <5%. Fail to reject Null hypothesis if
p-value >5%.
Step 5:
With chi square (2) = 1.43, p>5%, I fail to reject null hypothesis and conclude that Sex
and License Status are independent of each other. Tartakovsky, A., Nikiforov, I., &
Basseville, M. (2014).
Question 5 (5 marks)
a.
Various studies have different population which differs in their population size.
Depending upon the population, cost, time, effort and available situations, a correct
sampling procedure should be used. This sampling procedure is helpful in
determining the sample size. Hinton, P. R. (2014).
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Biostatistics Assignment 5
Also according to the desired standard deviation and margin of error, the sample size
for various studies differs. The sample size can be calculated with the help of:
n=z ( a
2 )
2
S d2
M E2
. Hence difference sample size is required for different studies.
b.
Given:
Alpha = 0.05 -> z(0.05/2)= 1.96
Power = 0.90
Beta = 0.10 -> z(0.10) = 1.28
Difference = 0.5
Sd= 3
I know that
n=2s
d2
(zbeta + z a
2 )2
differenc e2
n=232( z0.10 +z0.025 ) 2
0.52 n=232 (1.28+ 1.96 )2
0.52 n=755.8272
Required sample size is 756 to achieve a power of .90 with 5% level of significance
along with standard deviation of 3 units and a difference of 0.5 units.
c. ..
With the decrease in sample size, the sample might not be a good representative of
population. This would decrease the power and make the results not reliable. The
width of the confidence interval increases with the decrease in sample size. Also the
margin of error increases with the decrease in sample size. Hinton, P. R. (2014).
References
Tartakovsky, A., Nikiforov, I., & Basseville, M. (2014). Sequential analysis: Hypothesis
testing and changepoint detection. Chapman and Hall/CRC.
Mendenhall, W. M., Sincich, T. L., & Boudreau, N. S. (2016). Statistics for Engineering and
the Sciences, Student Solutions Manual. Chapman and Hall/CRC.
Hinton, P. R. (2014). Statistics explained. Routledge.
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]