Paper 8
1. The mean serum-creatinine level measured in 12 patients 24 hours after they received a newly
proposed antibiotic was 1.2 mg/dL.
• If the mean and standard deviation of serum creatinine in the general population are 1.0 and 0.4
mg/dL,
respectively, then, using a significance level of α = .05, test whether the mean serum-creatinine level in
this group is different from that of the general population.
Answer: To test whether the mean serum creatinine level in the group that received the newly proposed
antibiotic is different from that of the general population, you can perform a Z-test.
Null Hypothesis: The mean serum creatinine level in the group is equal to that of the general population
Alternative Hypothesis: The mean serum creatinine level in the group is different from that of the
general population
H0: µ = 1
H1: µ ≠ 1
̅ = 1.2 , α = 0.05 , µ0 = 1 , n = 12
𝒙
𝒛=
̅−𝝁𝟎
𝒙
𝝈
⁄ 𝒏
√
=
𝟏.𝟐−𝟏
𝟎.𝟒
√𝟏𝟐
= 𝟏. 𝟕𝟑
P-value = 2 × z0.025 = 2 × 0.042 = 0.084
Since the p-value (0.084) is greater than the chosen significance level (0.05), we would fail to reject the
null hypothesis. In other words, there is not enough evidence to conclude that the mean serum
creatinine level in the group that received the newly proposed antibiotic is different from that of the
general population.
What is the p-value for the test?
P-value = 2 × z0.025 = 2 × 0.042 = 0.084
• Suppose the sample standard deviation of serum creatinine is 0.6 mg/dL. Assume that the standard
deviation of serum creatinine is not known, and re-perform the hypothesis test. Report a p-value.
Since the standard deviation of serum creatinine in the general population is not known and we’re using
the sample standard deviation, we'll conduct a t-test instead of a Z-test. The formula for the t-test
statistic is as follows:
𝒕=
̅−𝝁𝟎
𝒙
𝒔
⁄ 𝒏
√
=
𝟏.𝟐−𝟏
𝟎.𝟔
√𝟏𝟐
= 𝟏. 𝟏𝟓𝟒
P-value = 2 × t0.025 = 2 × 0.1365 = 0.273
Compute a two-sided 95% confidence interval (CI) for the true mean serum-creatinine level.
𝑥̅ ± 𝑡 (
𝑠
√𝑛
)
(0.819, 1.581)
• How does the CI relate to your p-value?
The confidence interval provides a range of plausible values for the population parameter, and the pvalue assesses the strength of evidence against a specific null hypothesis value. These two aspects
together contribute to a more comprehensive understanding of the results of a statistical analysis.
2. Use the t-table and a computer program to compute the probability that a t distribution with 36 df
exceeds 2.5.
P (X > 2.5) = 1 – P (X ≤ 2.5) = 1 - =-
3. Use the t-table and a computer program to compute the lower 10th percentile of a t distribution with
54 df.
P (X < 0.1) = -1.29743
By R program: > # Define degrees of freedom
df <- 54
Calculate the t-value
qt(0.1, 54) = -1.29743
4. Plasma-glucose levels are used to determine the presence of diabetes. Suppose the mean ln (plasmaglucose) concentration (mg/dL) in 35- to 44-year-olds is 4.86 with standard deviation = 0.54. A study of
100 sedentary people in this age group is planned to test whether they have a higher or lower level of
plasma glucose than the general population.
If the expected difference is 0.10 ln units, then what is the power of such a study if a two-sided test is to
be used with α = .05?
α = 0.05, 𝜹 =0.10, 𝞼 = 0.54, n = 100
# Calculate the critical z-values for a two-sided test
z_critical <- qnorm(alpha / 2)
# Calculate the non-centrality parameter (lambda)
lambda <- sqrt(n) * delta / sigma
# Calculate the power
power <- 1 - pnorm(z_critical - lambda) + pnorm(-z_critical - lambda)
cat("The power of the test is:", round(power, 4), "\n")
The power of the test is: 1.543
How many people would need to be studied to have 80% power under the assumptions?
2
𝛿
+ 𝑧𝛽
𝜎
𝑛=( 2
)
𝑥̅ − 𝜇0
𝜎
𝑧𝛼 −
alpha <- 0.05
delta <- 0.10
sigma <- 0.54
power_target <- 0.80
# Calculate the critical z-values for a two-sided test
z_alpha <- qnorm(alpha / 2)
z_power <- qnorm(1 - (1 - power_target) / 2)
# Calculate the required sample size
required_sample_size <- ((z_alpha - delta / sigma + z_power) / (delta / sigma))^2
cat("The required sample size for 80% power is:", round(required_sample_size), "\n")
The required sample size for 80% power is: 22
Answer, if the expected difference is 0.20 ln units.
α = 0.05, 𝜹 =0.20, 𝞼 = 0.54, n = 100
# Calculate the critical z-values for a two-sided test
z_critical <- qnorm(alpha / 2)
# Calculate the non-centrality parameter (lambda)
lambda <- sqrt(n) * delta / sigma
# Calculate the power
power <- 1 - pnorm(z_critical - lambda) + pnorm(-z_critical - lambda)
cat("The power of the test is:", round(power, 4), "\n")
The power of the test is: 1.0406
How many people would need to be studied to have 95% power under the assumptions? (assuming that
the difference is 0.20 ln units.)
alpha <- 0.05
delta <- 0.20
sigma <- 0.54
power_target <- 0.95
#Calculate the critical z-values for a two-sided test
z_alpha <- qnorm(alpha / 2)
z_power <- qnorm(1 - (1 - power_target) / 2)
# Calculate the required sample size
required_sample_size <- ((z_alpha - delta / sigma + z_power) / (delta / sigma))^2
cat("The required sample size for 95% power with an expected difference of 0.20 ln units is:",
round(required_sample_size), "\n")
The required sample size for 95% power with an expected difference of 0.20 ln units is: 1
Suppose the incidence rate of myocardial infarction (MI) was 5 per 1000 among 45- to 54-year-old men.
To look at changes in incidence over time, 5000 men in this age group are followed and 15 new cases of
MI were found in this year.
Using the critical-value method with α = .05, test the hypothesis that incidence rates of MI changed.
𝑧=
𝑃̂1 −𝑃̂2
1
1
= -1.0017
√𝑃0 (1−𝑃0 )(𝑛 +𝑛 )
1
2
Population1 = 5000, p1 = 15/5000
Population2 = 1000 , p2 = 5/1000
Report the p-value.
p_value = 2 * (1 - pnorm(abs(z))) = 2 *( 1-0.158) = 0.316
Compute a two-sided 95% confidence interval (CI) for the true proportion.
𝑃̂(1 − 𝑃̂)
𝑃̂ ± 𝑧√
𝑛
15
15
15
√5000 (1 − 5000)
±-
(0.0015, 0.0045)
How does the CI relate to your p-value?
Both the confidence interval and the p-value provide information about the uncertainty or variability in
the data, and their interpretations and implications are related. A significant p-value (small) generally
corresponds to a confidence interval that does not include the null hypothesis value, and vice versa.
However, they convey complementary information and should be considered together for a more
comprehensive understanding of the results.