Week 3 Lab sheet

Yiling Huo

2024-05-14

All data in the exercises are simulated fake data.

Before the exercises: Object types in R

Excercise 1: IQ test

Suppose I want to know whether UCL students’ IQs are significantly different from the average (100)1 Fun fact: IQ tests are specifically designed such that the average person would receive the score 100.. I randomly picked 20 students at UCL and asked them to do an IQ test.

Here are their scores: 117 125 116 113 102 122 123 93 99 129 132 94 85 92 101 83 119 119 101 97 (mean = 108.1, s.d.=15.05).

  1. Decide which test statistics to use2 This wasn’t officially part of the lecture but it should be the one sample t-test. The idea is very simple: is the mean of a group of values significantly different from a specific number?.
  2. Decide which object type to save the collection of this data and save the data as an object. Choose between strings, vectors, and lists. Hint: We might not have talked about this in class. Try finding out the answer in the R documentation (important skill to learn!).
  3. Calculate the mean and the standard deviation (in R).
  4. Check whether the data are normally distributed.
  5. Run the one sample t-test. Hint: t.test(data, mu = 100).
  6. Are UCL students’ IQs significantly different from the average?
  7. Report your findings in a short paragraph.

Exercise 2: Word frequency in two types of writings

I’m interested in whether the frequency of the word ‘museum’ differ between humanities journal papers and blog articles on similar topics. I randomly accessed 10 corpora of humanities journals papers, and calculated the count of the word ‘museum’ per million words in each corpus. And then I did the same with humanities blog articles.

Frequencies of ‘museum’ in each journal paper corpus (count per million): 76 67 66 72 74 64 72 70 74 78

Frequencies of ‘museum’ in each blog article corpus (count per million): 66 63 68 68 60 67 58 70 67 66

  1. Decide which test to use.
  2. Make a data frame with the data:
    • think about what form (long or short) of data you need and visualise what the data frame should look like.
    • save the variables as vectors.
    • make a data frame using the vectors with data.frame().
  3. Visualise your data using boxplot(). (or any method you know to create a boxplot in R.)
  4. Get the descriptive statistics (means and standard deviations) using describeBy() from the psych package.
  5. Check whether your data meet the assumptions of your chosen statistical test.
  6. Run the test.
  7. Is there a significant difference between the frequency of ‘musuem’ in journal papers and blog articles?
  8. Report your findings in a short paragraph.

Exercise 3: Grammaticallity judgment

An experimental syntactician conducted an experiment on what’s called the that-trace phenomenon. 30 participants were presented with sentences such as (1) and (2). They were asked to judge the sentences’ grammaticallity on a 7 point scale (1 = totally ungrammatical; 7 = totally grammatical).

  1. Who do you think that will hire Mary? (‘that’ condition)
  2. Who do you think will hire Mary? (‘no that’ condition)

At the end, the researcher calculated the average score given to that sentences and no-that sentences for each participants (such that each person has a score in the ‘that’ condition and one score in the ‘no-that’ condition). The researcher now want to know whether there is a significant difference between the grammaticallity of ‘that’ sentences and ‘no-that’ sentences.

  1. Download the data Here.
  2. Read the data into a data frame by running data <- read.csv('that-trace.csv', header = TRUE).
  3. Visualise the data using a boxplot and get the descriptive statistics.
  4. Take a look at the data and decide which statistical test to use to answer the research questions.
  5. Check whether the data meet the assumptions of your chosen test.
  6. Run the test. Is there a significant difference?
  7. Report your findings in a short paragraph.

Exercise 4: Effect of interlocutor language distance on perceived phonetic convergence

During conversation, people often change the way they speak to sound more alike each other, this phenomenon is called phonetic convergence.

A researcher recorded some spontaneous conversations in English.3 The example is adapted from Kim, M., Horton, W. S., & Bradlow, A. R. (2011). Phonetic convergence in spontaneous conversations as a function of interlocutor language distance. Note that data used in this exercise are randomly generated fake data and conclusions may differ from the real experiment. These conversations were grouped by interlocutor language distance: Close (native Southern accent - native Southern accent); Intermediate (native Southern accent - native Northern accent); and Far (L2 English - L2 English (of different L1’s)). Each group had 15 conversations. All conversations were from different speakers.

Phonetic convergence is evaluated based on change in speach similarity: how close is speaker A’s speech to speaker B’s speech, at the end of the conversation compared with at the beginning of the conversation. In other words, the data are the convergence scores: similarity scores at the end - similarity scores at the beginning. The researcher is interested in whether interlocutor language distance affects phonetic convergence. In other words, the researcher wants to compare the mean convergence scores and see whether they differ from one another.

  1. Download the data Here.
  2. Read the data into a data frame by running data <- read.csv('interlocutor.csv', header = TRUE).
  3. Visualise the data using a boxplot and get descriptive statistics.
  4. Take a look at the data and decide which statistical test to use.
  5. Check whether the data meet the assumptions and run the test.
  6. Does interlocutor language distance affect phonetic convergence? Report your findings in a short paragraph.