Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello can you please help me get a better understanding of how to answer the question shown below? I have the code I used through

Hello can you please help me get a better understanding of how to answer the question shown below? I have the code I used through RStudio which I understand but I am confused on how to answer the question shown below from the data I gathered.

Question

Using the prop.test function(shown below), calculate and report confidence intervals for the proportion of atheists in 2012 in two other countries of your choice. Note whether the conditions for inference are met.

RStudio code/data:

First country i choose was Ireland

>Irl12 <- subset(atheism, nationality == "Ireland" & year == "2012")

> Irl12$nationality <- as.factor(as.character(Irl12$nationality))

>( Irl12prop <- prop.table(table(Irl12$nationality, Irl12$response)) )

> table(Irl12$response)

> dim(Irl12)

> prop.test(x = 50, n = 1002, conf.level = 0.95)

1-sample proportions test with continuity correction

data: 50 out of 1002, null probability 0.5

X-squared = 810.18, df = 1, p-value < 2.2e-16

alternative hypothesis: true p is not equal to 0.5

95 percent confidence interval:

0.03761982 0.06574456

sample estimates:

p

0.0499002

Second country was Spain

> spn12 <- subset(atheism, nationality == "Spain" & year == "2012")

> spn12$nationality <- as.factor(as.character(spn12$nationality))

> ( spn12prop <- prop.table(table(spn12$nationality, spn12$response)) )

atheist non-atheist

Spain 0.08995633 0.91004367

> table(spn12$response)

atheist non-atheist

103 1042

> dim(spn12)

[1] 1145 3

> prop.test(x = 50, n = 1002, conf.level = 0.95)

1-sample proportions test with continuity correction

data: 50 out of 1002, null probability 0.5

X-squared = 810.18, df = 1, p-value < 2.2e-16

alternative hypothesis: true p is not equal to 0.5

95 percent confidence interval:

0.03761982 0.06574456

sample estimates:

p

0.0499002

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorics And Graph Theory

Authors: John M Harris, Jeffry L Hirst, Michael J Mossinghoff

2nd Edition

0387797114, 9780387797113

More Books

Students also viewed these Mathematics questions

Question

2. Talk to other teachers or parents about ideas for reinforcers.

Answered: 1 week ago

Question

5. It is the needs of the individual that are important.

Answered: 1 week ago

Question

3. It is the commitment you show that is the deciding factor.

Answered: 1 week ago