Copy and paste the following code to load the dataset for the next few questions into R: fire <- read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp- content/data/chapter09/chap09q07FrogsFire.csv")) firetable <- table(fire$direction, fire$sound) firetable Scientists observed that Reed Frogs that live in fire-prone habitats of West Africa honned away from grass fires lo

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
31.
Copy and paste the following code to load the dataset for the next few questions into R:
fire <- read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp-
content/data/chapter09/chap09q07FrogsFire.csv"))
firetable <- table(fire$direction, fire$sound)
firetable
Scientists observed that Reed Frogs that live in fire-prone habitats of West Africa hopped away from grass fires long
before the flames reached their position. They hypothesized that the frogs were responding to sound stimuli of fires
in order to make early escapes. To test this hypothesis, they set up an experiment with Reed Frogs. In this
experiment, they played one of three different recordings to frog subjects and observed their behavior. The three
recordings were an actual recording of a grass fire, a recording of the grass fire played backwards, and a recording of
white noise. The frogs were then observed to see if they hopped away from the recording or didn't hop away from
the recording. Each of these recordings had twenty observational trails. The data are summarized in the firetable
dataset loaded into R (backwards is recording played backward, fire is the fire recording, noise is the white noise
recording).
Perform a chi-square contingency test on this dataset in R. What is the value of the chi-squared test statistic?
Transcribed Image Text:Copy and paste the following code to load the dataset for the next few questions into R: fire <- read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp- content/data/chapter09/chap09q07FrogsFire.csv")) firetable <- table(fire$direction, fire$sound) firetable Scientists observed that Reed Frogs that live in fire-prone habitats of West Africa hopped away from grass fires long before the flames reached their position. They hypothesized that the frogs were responding to sound stimuli of fires in order to make early escapes. To test this hypothesis, they set up an experiment with Reed Frogs. In this experiment, they played one of three different recordings to frog subjects and observed their behavior. The three recordings were an actual recording of a grass fire, a recording of the grass fire played backwards, and a recording of white noise. The frogs were then observed to see if they hopped away from the recording or didn't hop away from the recording. Each of these recordings had twenty observational trails. The data are summarized in the firetable dataset loaded into R (backwards is recording played backward, fire is the fire recording, noise is the white noise recording). Perform a chi-square contingency test on this dataset in R. What is the value of the chi-squared test statistic?
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman