联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2019-03-21 08:35

R/RStudio Assignment for Test #2

STA258

Spring 2019

General Instructions

Put all output for all parts of each question on one side of a standard 8.5x11 page. For

this assignment you will produce two pages of solution, one page for each question.

Start each question on a fresh sheet of paper.

At the top of each page, write or type the title of the question. Under the title put

your full name and student ID#. Under that type the sentence: I certify that this is

my own original work. Then sign your name beside this sentence. The top of each

page should look like this:

Question Title Given in the Question

Alison Weir 1234123412

I certify that this is my own original work.

Each question will ask you to add some R/RStudio output and some R/RStudio

graphs to the page. You can add the question part letters to your page. DO NOT

ADD ANYTHING ELSE TO YOUR SOLUTIONS. You may need to resize the graphs

to fit everything on a single side of an 8.5x11 sheet of paper.

Question 1

Title: Slasher Films

Are the victims in slasher films more likely to be women than men? And are they more

likely to be sexually active women than non-sexually active women? In 2010 an academic

paper that addressed these questions was published. The paper analyzed data on 485

characters in a random selection of 5o slasher films.

The raw data is in the file slasherfilms.xlsx.

Variable name Description

sex Coded: 1= Female and 0=Male

active If the character is sexually active in the movie.

Coded as 1 = Yes and 0 = No

survival If the character survived to the end of the movie.

Coded as 1 = Yes and 0 = No

Page 2 of 3

Reference: A. Welsh (2010). "On the Perils of Living Dangerously in the Slasher Horror

Film: Gender Differences in the Association Between Sexual Activity and Survival," Sex

Roles, Vol. 62 pp. 762-773

To answer the questions below, you can find the counts in R, or you can find them using

the excel file.

For each question below use comments in R’s session window to title your output.

R comments start with the hashtag symbol, #. Any text written after the # symbol, and

before hitting return, are ignored by R.

a. Use R to test the hypothesis that females are less likely to survive than males. Use

three lines of comments in your R session window to title your output. The first

comment should state the null hypothesis, the second line should state the alternative

hypothesis, and the third line should be your full name (as it appears on your T-card).

Copy-and-paste the three lines of comments, the R command, and its response

directly from the session window into your R assignment.

b. Use R to test the hypothesis that sexually females are more likely to survive than nonsexually

active females. Use three lines of comments in your R session window to title

your output. The first comment should state the null hypothesis, the second line

should state the alternative hypothesis, and the third line should be your full name (as

it appears on your T-card). Copy-and-paste the three lines of comments, the R

command, and its response directly from the session window into your R assignment.

Question 2

Title: Learning About Metaphors

We use metaphors when we apply a word (or a phrase) to an object (or a situation) that is

not actually physically possible to apply to that object (or situation). Here are some

examples of metaphors:

Joe’s answer to the problem was just a Band-Aid, not a solution.

Ali’s plan to get into college was a house of cards on a crooked table.

She cut him down with her words.

Words are the weapons with which we wound.

The clouds sailed across the sky.

The traditional method of teaching school children about metaphors is called the Basal

Method. In this approach, the children discover the concept of metaphor by reading

leveled books and encountering sentences that contain metaphors. The children

recognize that these sentences cannot be taken literally. After the children have made

this observation, the teacher tells them that these sentences contain metaphors and

discusses the concept.

Page 3 of 3

Some education researchers hypothesised that children would learn the concept better if

the teacher used direct explicit instruction, a method of teaching called the Processing

Method. In this approach, the teacher introduces the idea (and the word metaphor) and

presents examples, before children read sentences that contained metaphors.

To assess their idea, the researchers tested two classes of children on they ability to

recognise metaphors. One class was taught using the Basal Method and the other was

taught using the Processing Method.

The data is in the file metaphor.xlsx.

Variable name Description

ID Unique identifier for each child. Not included in the analysis.

instruction Instruction method. Coded 1= processing Method and 2 = Basal

Method

score

Recognizing metaphors test score. Maximum score is 8 and

minimum score is 0.

Reference: J.R. Readence, R.S. Baldwin, M.H. Head (1986). "Direct instruction in

Processing Metaphors," Journal of Reading Behavior, Vol. VXIII, #4, pp. 325-339.

Before reading the data into R, relabel column titled score with your family name.

a. Use R to make a histogram and a normal probability plot of the score data, within

each of the two instruction methods. You can add titles to the plots (if you want to),

but please don’t change the default labels on the axes. Copy all four plots directly into

your assignment.

b. Use R to test the hypothesis that children taught using the Processing Method are

better equipped to recognize metaphors, on average, then are children taught using

the Basal Method. Use three lines of comments in your R session window to title your

output. The first comment should state the null hypothesis, the second line should

state the alternative hypothesis, and the third line should be your full name (as it

appears on your T-card). Copy-and-paste the three lines of comments, the R

command, and its response directly from the session window into your R assignment.

c. Use R to construct a central 98% confidence for the difference in the two mean test

scores. Use two lines of comments in your R session window to title your output. The

first comment should state what you’re about to do, and the second line should be

your full name (as it appears on your T-card). Copy-and-paste the two lines of

comments, the R command, and its response directly from the session window into

your R assignment.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp