0% found this document useful (0 votes)
34 views4 pages

Genetic Testing and Political Preference Analysis

The assignment involves analyzing survey data on opinions regarding mandatory genetic testing for inherited diseases among Canadian adults, segmented by political party preference. It requires formulating hypotheses, calculating a chi-square test statistic, and interpreting the results to determine if there is a significant association between political preference and testing opinions. The conclusion indicates that there is no statistically significant association at the 10% significance level.

Uploaded by

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

Genetic Testing and Political Preference Analysis

The assignment involves analyzing survey data on opinions regarding mandatory genetic testing for inherited diseases among Canadian adults, segmented by political party preference. It requires formulating hypotheses, calculating a chi-square test statistic, and interpreting the results to determine if there is a significant association between political preference and testing opinions. The conclusion indicates that there is no statistically significant association at the 10% significance level.

Uploaded by

samanthatoulis04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of Guelph

STAT*2230- Biostatistics for Integrative Biology


Assignment (5)- W2025

Please submit a typed (not handwritten) version of the assignment. Include both your R code
and the corresponding output/results by copying and pasting them into the Word document as
requested.

Question (10 marks)

Should genetic testing for inherited diseases be a requirement for all individuals, or should it
be optional? Assume a survey was conducted among Canadian adults aged 18 and over, asking
them about their opinions on whether genetic testing for inherited diseases should be
mandatory, along with their political preferences. The following table shows the responses:

Observed numbers of adults


Party
Testing Liberal Conservative Total
Preference
No 230 250 230+250=480
Yes 380 470 380+470=850
Total 230+380=610 250+470=720 480+850=1330

We want to test, at the 10% significance level, if there is any statistical reason to believe there
is an association between political party preference and opinions about mandatory genetic
testing for inherited diseases?

a) (2 marks) State the two hypotheses of interest.

Null hypothesis (H0) = There is no association between political party preference and opinions
about mandatory genetic testing for inherited diseases. (Political party preference and opinions
about mandatory genetic testing are independent)
Alternative hypothesis (HA) = There is an association between political party preference and
opinions about mandatory genetic testing for inherited diseases. (Political party preference
and opinions about mandatory genetic testing are dependent)
b) (3 marks) Calculate an appropriate test statistic for (a) without using R commands.
Round the numbers during the calculations and the final answer for calculated chi-square
to two decimal places. Use the table below to do your expected frequencies calculations.
Do the calculations without using R commands.

Eij = (row I total)(column j total)/sample size


Expected numbers of adults
Party
𝑒 Liberal Conservative Total
No 480x610/1330 = 480x720/1330 = 220.15+259.85
292800/1330 = 345600/1330 = = 480
220.15 259.85
Yes 850x610/1330 = 850x720/1330 = 389.85+460.15
518500/1330 612000/1330 = 850
389.85 460.15
Total 259.85+460.15 = 480+850 =
220.15+389.85 = 610 720 1330
X = ∑I = 1 (fi – ei) /ei
2 K 2

For No
Liberal
X2 = (230-220.15)2/220.15
X2 = (9.85)2/220.15
X2 = 97.0225/220.15
X2 = 0.44
Conservative
X2 = (250-259.85)2/259.85
X2 = (-9.85)2/259.85
X2 = 97.0225/259.85
X2 = 0.37
For yes
Liberal
X2 = (380-389.85)2/389.85
X2 = (-9.85)2/389.85
X2 = 97.0225/389.85
X2 = 0.25
Conservative
X2 = (470 – 460.15)2/460.15
X2 = (9.85)2/460.15
X2 = 97.0225/460.15
X2 = 0.21
Sum of all contributions
X2 = 0.44+0.37+0.25+0.21=1.27
X2 = 1.27

c) (2 marks) Write your conclusion using the rejection region method (include both a
statistical conclusion and an interpretation related to the topic of the study). You can use
R to get an appropriate critical value and show the code and the output.
> qchisq(0.90, df = 1)
[1] 2.705543

Calculated X2 = 1.27

Critical Value = 2.71

Since X2 = 1.27 is less than the critical value of 2.71, we fail to reject the null hypothesis. (not
statistically significant)

X2 = 1.27 < X20.10, fail to reject the null hypothesis


At the 10% significance level, which is not statistically significant, we do not have enough
evidence to conclude that there is an association between political party preference and
opinions about mandatory genetic testing.
The survey results suggest that political preference (Liberal vs. Conservative) does not
significantly influence whether a person supports or opposes mandatory genetic testing for
inherited diseases.
d) (1 mark) Read the observed data into R using [Link](). Show your code only not the data.

> observed <- [Link](matrix(c(230, 250, 380, 470), nrow = 2, byrow = TRUE))
> Mydata <- [Link](rbind(c(230,250), c(380, 470)))
> dimnames(Mydata)<- list(testing preference = c("no", "yes"), party =
c("liberal","conservative"))
> (Xsqtest <- [Link](Mydata))

e) (2 marks) Use [Link]() in R and interpret your finding. Show your code and output.
> [Link](Mydata)

Pearson's Chi-squared test with Yates' continuity correction

data: Mydata
X-squared = 1.1477, df = 1, p-value = 0.284

Test Statistic (X2): 1.1477

Degrees of Freedom (df): 1

P-value: 0.284

Since the p-value (0.284) is greater than 0.10, we fail to reject the null hypothesis at the
10% significance level.
p-value (0.284) > 0.10-> fail to reject null hypothesis
There is no statistically significant association (not statistically significant) between testing
preference (yes vs. no) and party (liberal vs. conservative). This suggests that political party
does not significantly influence their preference of mandatory genetic testing for inherited
diseases.

Common questions

Powered by AI

Sample size impacts the power of the chi-square test to detect an association. A larger sample size can provide more reliable estimates of expected frequencies, reducing the risk of type II errors and increasing the test's sensitivity to detect actual associations. In the context of this test, the sample size provides the foundation for calculating expected frequencies .

In the context of the chi-square test, 'statistically significant' means that the observed association between political party preference and opinions on mandatory genetic testing would be considered unlikely to have occurred by chance if the null hypothesis were true. Here, the test was not found statistically significant, as the calculated X2 value did not exceed the critical value .

Considering both party preference and opinions on genetic testing allows for analysis of potential correlations between political ideology and healthcare opinions. This can reveal insights into broader sociopolitical influences on public health policies, informing more effective communication and policy design regarding genetic testing .

The chi-square test results, specifically the calculated X2 value (1.27) being less than the critical value (2.71), indicated that there was no statistically significant evidence to reject the null hypothesis. Thus, the test suggested that there is no significant association between political party preference and opinions on mandatory genetic testing .

If a statistically significant association had been found, it would imply that political party preference influences opinions on mandatory genetic testing. This could inform policymakers about potential partisan divides in opinion, potentially guiding targeted educational or communication initiatives to address concerns about genetic testing among specific political groups .

Expected frequencies are calculated using the formula Eij = (row i total)(column j total)/sample size. For the contingency table given, expected frequencies were calculated as follows: For 'No' and 'Liberal', E = 480x610/1330 = 292800/1330 = 220.15; for 'No' and 'Conservative', E = 480x720/1330 = 345600/1330 = 259.85; and similarly for other cells .

The statistical principle used is comparing the calculated chi-square test statistic to a critical value at a specified significance level. If the test statistic is greater than the critical value, the null hypothesis is rejected. For this test, since the calculated chi-square (X2 = 1.27) was less than the critical value (2.71 at 10% significance level), the null hypothesis was not rejected .

The p-value indicates the probability of observing the data, or something more extreme, assuming the null hypothesis is true. A p-value greater than the significance level suggests failing to reject the null hypothesis. Here, with a p-value of 0.284 (greater than 0.10), it suggests no significant evidence to reject the null hypothesis .

The two hypotheses of interest were: Null hypothesis (H0) = There is no association between political party preference and opinions about mandatory genetic testing for inherited diseases. (Political party preference and opinions about mandatory genetic testing are independent). Alternative hypothesis (HA) = There is an association between political party preference and opinions about mandatory genetic testing for inherited diseases. (Political party preference and opinions about mandatory genetic testing are dependent).

Using R for statistical analysis enhances the rigour of biostatistical studies by enabling accurate and reproducible calculations, particularly for complex statistical tests like chi-square. R offers robust functions for data manipulation, computation, and visualization, allowing for precise interpretation and validation of results as demonstrated in this chi-square test with the chi-square test function .

You might also like