Biostatistics Assignments

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

MEDICAL BIOSTATISTICS ASSIGMENT

1. Explain the difference between Type I and type II


error
Type I and Type II errors are concepts used in hypothesis testing, which
is a statistical method for making inferences about a population based on
sample data. These errors represent the potential mistakes that can occur
when drawing conclusions from statistical tests.

1. Type I Error (False Positive):


A Type I error occurs when we reject a null hypothesis that is actually
true. In other words, it is the incorrect rejection of a true null hypothesis.
This error is also known as a false positive. It implies that we have found
a significant effect or relationship when there is none in reality. The
probability of committing a Type I error is denoted by the symbol α
(alpha) and is typically set as the significance level (e.g., 0.05 or 0.01)
before conducting the statistical test.

2. Type II Error (False Negative):


A Type II error occurs when we fail to reject a null hypothesis that is
actually false. In other words, it is the incorrect acceptance of a false null
hypothesis. This error is also known as a false negative. It implies that we
have failed to detect a significant effect or relationship when one exists.
The probability of committing a Type II error is denoted by the symbol β
(beta).

To summarize:
- Type I error is the rejection of a true null hypothesis (false positive).
- Type II error is the failure to reject a false null hypothesis (false
negative).

It is important to strike a balance between these two types of errors when


designing statistical tests. The choice of significance level (α) and sample
size can influence the probabilities of Type I and Type II errors. Reducing
one type of error often increases the likelihood of the other, so
researchers must carefully consider the trade-offs and the consequences
of each error type in their specific context.

2. The table below shows the number of patients who


were treated for snake bite in a certain rural
hospital and how they responded to the treatment
depending on whether the treatment which
included a timely antivenom administration or not.
Patient Patient
survived died
Antivenom within 300 25
the first one hour
Antivenom after 120 100
the first one hour
No antivenom 50 200
administered
Can one conclude from these data that that there is
a significant association between antivenom
administration and patient’s chances of survival.?
Let alpha= 0.05. What is the p value for the test?

To determine if there is a significant association between antivenom


administration and patient survival, we can perform a chi-square test
of independence. This test assesses whether there is a relationship
between two categorical variables.

First, let’s set up the null and alternative hypotheses:

Null hypothesis (H0): There is no association between antivenom


administration and patient survival.
Alternative hypothesis (Ha): There is an association between
antivenom administration and patient survival.

We can now calculate the chi-square test statistic and the


corresponding p-value using the given data:
OBSERVED FREQUENCIES

Patients Patients died Total


survived
Antivenom 300 25 325
within the first
one hour
Antivenom after 120 100 220
the first one
hour
No antivenom 50 200 250
administered
Total 470 325 795

To calculate the chi-square test statistic, we use the formula:

Χ² = Σ [(O – E)² / E]

Where O is the observed frequency and E is the expected frequency


under the assumption of independence.

Expected frequencies can be calculated by multiplying the row total


by the column total and dividing by the grand total. For example, the
expected frequency for the cell “Antivenom within the first one hour”
and “Patient survived” is (325 * 470) / 795 = 192.14.
EXPECTED FREQUENCIES

Patients Patients Total


survived died
Antivenom 192.14 132.86 325
within the
first one
hour
Antivenom 130.06 89.94 220
after the first
one hour
No 147.80 102.20 250
antivenom
administere
d
Total 470 325 795

Performing the calculations for all cells, we get the following chi-
square test statistic:
Χ² = [(300 – 192.14)² / 192.14] + [(25 – 132.86)² / 132.86] + [(120 –
130.06)² / 130.06] + [(100 – 89.94)² /89.94] + [(50 – 147.80)² /147.80]
+ [(200 – 102.20)² / 102.20] = 308.32

To find the p-value associated with this chi-square statistic, we need


to consult the chi-square distribution table or use statistical software.
With a significance level (α) of 0.05 and degrees of freedom equal to
(number of rows – 1) * (number of columns – 1) = (3 – 1) * (2 – 1) =
2, we find that the p-value is less than 0.001.

Therefore, the p-value for the test is less than 0.001. Since this p-value
is smaller than the significance level of 0.05, we reject the null
hypothesis. We can conclude that there is a significant association
between antivenom administration and patient’s chances of survival
based on the given data.

3. To check if three weeks of a certain intense physical


exercise are enough to make participants lose
weight, seven students were weighed before and
after a three week period of that intense physical
exercise and the following results were recorded:
Student Weight before Weight after
number the three week three weeks of
period (kg) activity (kg)
1 53.2 52.1
2 63.6 61.7
3 56.4 53.5
4 73.8 70.2
5 46.5 45.0
6 58.2 54.9
7 65.0 61.9
Is there sufficient evidence at the alpha= 0.05 level of
significance for us to conclude that three weeks of
physical such exercise are enough to cause significant
weight loss?
To determine if three weeks of intense physical exercise are enough to
cause significant weight loss, we can perform a paired t-test on the given
data. The null hypothesis (H0) is that there is no significant difference in
weight before and after the three-week period, while the alternative
hypothesis (Ha) is that there is a significant difference.

First, we calculate the differences in weight for each student by


subtracting the weight before the three-week period from the weight after
the three-week period:
Student Weight Weight Difference (x-MD) (x-MD)²
Numbe before after in weight
r (n) the the (kg) (x)
three- three-
week week
period period
(kg) (kg)
1 53.2 52.1 -1.1 1.386 1.920996
2 63.6 61.7 -1.9 0.586 0.343396
3 56.4 53.5 -2.9 -0.414 0.171396
4 73.8 70.2 -3.6 -1.114 1.240996
5 46.5 45.0 -1.5 0.986 0.972196
6 58.2 54.9 -3.3 -0.814 0.662596
7 65.0 61.9 -3.1 -0.614 0.376996
Sum of (x- Sum of (x-
MD)=2x10- MD)²=5.688572
3

Next, we calculate the mean difference (MD) and the standard deviation
of the differences (SD):

MD = (-1.1 – 1.9 – 2.9 – 3.6 – 1.5 – 3.3 – 3.1) / 7 = -17.4 / 7 (-2.486 kg)

SD = [summation (x-MD)²/n-1]

SD= (5.688572/6)
=0.948
Using the t-distribution table or a statistical software, we can find the
critical t-value for a two-tailed test with 6 degrees of freedom and an
alpha level of 0.05. The critical t-value is approximately 2.447.
Now, we can calculate the t-value using the formula:

T = (MD – 0) / (SD / √(n))

Where n is the number of observations (in this case, 7).

T = (-2.486– 0) / (0.948 / √(7)) ≈ -2.486 / 0.353


= -7.042

Since the absolute value of the calculated t-value (-7.042) is less than the
critical t-value (2.447), we fail to reject the null hypothesis. This means
that there is not sufficient evidence at the alpha = 0.05 level of
significance to conclude that three weeks of intense physical exercise are
enough to cause significant weight loss.

In other words, based on the given data, we cannot conclude that the
observed differences in weight are statistically significant and solely
attributable to the three weeks of intense physical exercise. Other factors
may have influenced the weight changes.

4. A study by Dr. Obiero examined a sample of 16


subjects with glaucoma. The ages (years) of the
subjects were:
62,62, 68, 48, 51, 60, 51, 57, 57, 41, 62, 50, 53, 34, 62
and 61.
Calculate the 95% confidence interval for the
population age of people with glaucoma.

To calculate the 95% confidence interval for the population age of people
with glaucoma, we can use the formula:
At 95% confidence interval;
The lower limit (L1)=x̄ -1.96sx̄
The upper limit (L2)=x̄ +1.96sx̄

First, let’s calculate the sample mean:


Sample Mean = (62 + 62 + 68 + 48 + 51 + 60 + 51 + 57 + 57 + 41 + 62 +
50 + 53 + 34 + 62 + 61) / 16
= 879 / 16
X̄ =54.9375

Next, we need to calculate the standard error. The standard error


measures the variability of the sample mean:
Standard Error=Standard deviation/√n

Standard Deviation = √[(Σ(x – x̄ )²) / (n – 1)]

Where Σ represents the sum, x represents each individual age, x̄


represents the sample mean, and n represents the sample size.
x x-x̄ (x-x̄ )²
62 7.0625 49.87890625
62 7.0625 49.87890625
68 13.0625 170.62890625
48 -6.9375 48.12890625
51 -3.9375 15.50390625
60 5.0625 25.62890625
51 -3.9375 15.50390625
57 2.0625 4.25390625
57 2.0625 4.25390625
41 -13.9375 194.25390625
62 7.0625 49.87890625
50 -4.9375 24.37890625
53 -1.9375 3.75390625
34 -20.9375 438.37890625
62 7.0625 49.87890625
61 6.0625 36.75390625
Σ(x-x̄ )=0 Σ(x-x̄ )²=1180.9375
Standard deviation=√1180.9375/15
=34.365
Standard Error (sx̄ )=standard deviation/√n
Sx̄ =34.365/√16
=8.591
Now, we need to find the critical value for a 95% confidence level. Since
the sample size is small (n < 30), we can use the two-tailed t-distribution.
With 15 degrees of freedom (n – 1), the critical value for a 95%
confidence level is approximately 2.131.
Finally, we can calculate the confidence interval:
At 95% confidence interval;
The lower limit (L1)=x̄ -1.96sx̄
L1=54.9375-(1.96 x 8.591)=38.099
The upper limit (L2)=x̄ +1.96sx̄
L2=54.9375-(1.96 x 8.591)=71.776
Therefore, the 95% confidence interval for the population age of people
with glaucoma is (38.099≤μ≤71.776). This means that we can be 95%
confident that the true population age of people with glaucoma falls
within this range.

5. A test designed to measure mothers’ attitudes


toward their labor and delivery experiences was
given to two groups of new mothers. Sample 1
(attenders) had attended prenatal classes held at
the local health department. Sample 2 (non-
attenders) did not attend the classes. The sample
sizes and means and standard deviations of the test
scores were as follows:

A. Construct a 95 percent confidence interval for


the difference between population means.
To calculate the confidence interval and perform the hypothesis test, we
need the critical value from the t-distribution and the test statistic.

First, we need to calculate the critical value (t) for a 95% confidence
level with (n1+n2-2) degrees of freedom. Since the sample sizes are small,
we use the t-distribution instead of the z-distribution.

The degrees of freedom (df) can be calculated as: (n1+n2-2)

In this case, df = 15 + 22 – 2 = 35
Using a t-table or a statistical software, we find the critical value for a
two-tailed 95% confidence level with 35 degrees of freedom to be
approximately 2.030.
Next, we substitute the values into the formula to calculate the
confidence interval:

Confidence Interval= (x̄ 1-x̄ 2) ± t(s1/√n1 + s2/√n2)

Calculating the values inside the parentheses:

Lower limit of the Confidence interval= (4.75-3.00)-[2.030(1/√15 +


1.5/√22)=0.577
Upper limit of the Confidence interval= (4.75-3.00)+[2.030(1/√15 +
1.5/√22)=2.923

The 95% confidence interval for the difference between population


means is approximately (0.577, 2.923).

B.Determine if these data provide sufficient


evidence for us to conclude that the to indicate
that attenders, on the average, score higher than
non-attenders. Let alpha =0.05
To perform the hypothesis test, we need to calculate the test statistic
using the formula:

Where μ1 and μ2 are the population means of Sample 1 and Sample 2,


respectively.

Since the null hypothesis states that there is no difference in the means
( μ1 = μ2) we can simplify the formula to:
Calculating the test statistic:
t= 4.258
To determine if these data provide sufficient evidence to conclude that
attenders, on average, score higher than non-attenders, we compare the
test statistic to the critical value from the t-distribution with 35 degrees of
freedom at a significance level of 0.05.
Since the test statistic (4.258) is greater than the critical value (2.030), we
reject the null hypothesis and conclude that there is sufficient evidence to
indicate that attenders, on average, score higher than non-attenders.

You might also like