Lab_Wk08_2023_final

.docx

School

University of Wollongong *

*We aren’t endorsed by this school

Course

251

Subject

Statistics

Date

Jan 9, 2024

Type

docx

Pages

5

Uploaded by PresidentMusicCaterpillar33

Report
STAT251 Fundamentals of Biostatistics LABORATORY NOTES, Week 8 Comparison of Two Groups Aim: The aim of this lab is to perform hypothesis tests relating to two samples. 1. Comparison of Means Download the Lipid Data file from Moodle. A researcher wishes to determine whether there is a significant difference between diastolic BP (blood pressure) between men and women. 1.1. Exploratory Data Analysis Log book questions: 1. a. Which statistical test is most appropriate for addressing this research question? [Hint: Are the groups paired or independent?] b. Perform exploratory data analysis of Diastolic BP by Gender and fill-in the table provided. Jamovi Instructions: Bivariate Exploratory Data Analysis Analyses → Exploration → Descriptives with DiastolicBP in the Variables box and Gender in the Split by box Select Histogram and Box plot in the Plots option. Group Sample size ( n ) Mean ( ´ x ) Medians Std. deviation ( s ) minimum maximum Female (F) n F = ¿ ´ x F = ¿ Q 2 F = ¿ s F = ¿ Male (M) n M = ¿ ´ x M = ¿ Q 2 M = ¿ s M = ¿ c. With reference to the histograms, side-by-side boxplot, and the summary statistics for each group, what do you notice about the distribution of Diastolic BP between men and women? Make particular reference to any plots or statistics you’ve used. d. Something seems very strange about one of the measurements. What should be done with this observation? We will exclude the individual with the erroneous diastolic BP entry from our analyses. Jamovi Instructions: Excluding observations from analysis In the Data tab, click Filters . A new window will open. Type the formula “DiastolicBP < 144” and hit Enter on your keyboard. STAT 251 Laboratory Notes Week 8 1
Log book questions: 2. a. Redo the exploratory analysis and comment upon whether there is evidence of non- Normality. Jamovi Instructions: Enabling Normality Plots with Tests From the Jamovi Descriptives procedure, under Statistics, select Shapiro-Wilk . Under Plots , select Histogram . Group Sample size ( n ) Mean ( ´ x ) Medians Std. deviation ( s ) minimum maximum Female (F) n F = ¿ ´ x F = ¿ Q 2 F = ¿ s F = ¿ Male (M) n M = ¿ ´ x M = ¿ Q 2 M = ¿ s M = ¿ b. What do you notice? How have the summary statistics changed for Females? c. Comment on any further outlying point/s. What should be done with this observation? One (ad hoc) method for addressing similarity between the means of two groups is to plot side-by-side confidence intervals (CIs) for the means and comparing the amount of overlap between these confidence intervals. The less overlap between these CIs, the more evidence there is that the population means may be different. Jamovi Instructions: Side-by-side Confidence Intervals Select Analysis T-Tests → Independent Samples T-Test Move DiastolicBP to the Dependent Variable(s) box, and Gender to the Grouping Variable box. Under Additional Statistics, select Descriptives and Descriptives plots . 3. Comment on the degree of overlap between the 95% CIs for male and female Diastolic BP. What does this suggest about the researcher’s question of interest? 1.2. Hypothesis Testing The formal process which directly addresses the researcher’s question is Hypothesis Testing . Log book questions: 4. Perform the appropriate hypothesis testing procedure in Jamovi and fill-in the information in the table provided below. Jamovi Instructions: Independent-Samples t-Test Select Analysis T-Tests → Independent Samples T-Test Move DiastolicBP to the Dependent Variable(s) box, and Gender to the Grouping Variable box. To perform a pooled t-test (for equal variances), under Tests , select Student’s . To perform an unpooled t-test (for unequal variances), select Welch’s . STAT 251 Laboratory Notes Week 8 2
Hypotheses: H 0 : μ F = μ M against H a : μ F ≠ μ M . Pooled s Std error (se) DF Test stat. p -value Pooled s p = ( n F 1 ) s F 2 + ( n M 1 ) s n F + n M 2 se = ¿ df = ¿ t = ¿ p -val = ¿ Unpooled se = ¿ df = ¿ t = ¿ p -val = ¿ 5. a. Is a pooled or an unpooled t-test more appropriate for this example? b. On the basis of the p -value, is there a significant difference in mean diastolic blood pressure between the genders? (Use significance level = 0.05.) c. Does this decision make sense given the side-by-side confidence interval plot? d. Report the 95% confidence interval for the difference in diastolic blood pressure, and write a sentence interpreting it in the context of the problem. Optional: 6. Re-do the hypothesis test (log book questions 4 & 5) by removing the additional outlier and as- sess its impact on the results. STAT 251 Laboratory Notes Week 8 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2. Comparison of Two Proportions (Paired Samples – McNemar’s test) A prospective study classified 498 subjects as normal or overweight at baseline (the beginning of the study) and also 20 years later. The investigators are interested in detecting whether the population proportion of overweight subjects changed after 20 years. 20 Years after Baseline Normal (N) Overweight (O) Baseline Normal (N) 175 93 Overweight (O) 22 208 Use notation: x NO = 93 subjects were initially of normal weight but were overweight 20 years later x ON = 22 subjects were initially overweight but were of normal weight 20 years later Then answer the following questions. Log book questions: 7. a. Find the following sample proportions: i. overweight at baseline. [Hint: how many people are overweight at baseline, and what do you need to divide that number by to find the proportion?] ii. overweight after 20 years. [Hint: use same thought process as above but for this characteristic.] b. Are the samples independent or matched (i.e. paired)? Explain. To test whether the population proportion of overweight subjects changed after 20 years, we can perform McNemar’s Test . Details for this test can be found in Week 7 Lecture part 4 . c. Write down the null and alternative hypotheses (two-sided). d. Find McNemar’s test statistic by calculator. χ 2 = ( x NO x ON ) 2 x NO + x ON e. Use Jamovi or a web calculator to find the p-value from the chi-squared distribution, and state the conclusion in the context of the problem. f. Check your calculations with Jamovi by following the steps below: i. Enter the data into a table in Jamovi as shown: STAT 251 Laboratory Notes Week 8 4
ii. Perform McNemar’s Test: Jamovi Instructions: Analysing Contingency Tables in Jamovi (McNemar test) Select Analyses → Frequencies → Paired Samples , select the two variables of interest ( baseline in the Row(s) box and twentyyears in the Column(s) box). Use the output to confirm your conclusions. Make sure the table that Jamovi outputs looks like yours, that is the “diagonal” is from left top to bottom right. STAT 251 Laboratory Notes Week 8 5