Skip to main content Accessibility help
×
Hostname: page-component-76d6cb85b7-rxvq6 Total loading time: 0 Render date: 2026-07-16T09:09:48.457Z Has data issue: false hasContentIssue false

2 - Graphical data exploration

Published online by Cambridge University Press:  05 June 2012

R. H. Baayen
Affiliation:
University of Alberta
Get access

Summary

Random variables

Chapter 1 introduced the data frame as the data structure for storing vectors of numbers as well as factors. Numerical vectors and factors represent in R what statisticians call random variables. A random variable is the outcome of an experiment. Here are some examples of experiments and their associated random variables:

  • tossing a coin Tossing a coin will result in either “head” or “tail.” Hence, the toss of a coin is a random variable with two outcomes.

  • throwing a dice In this case, we are dealing with a random variable with six possible outcomes, 1, 2, …, 6.

  • counting words We can count the frequencies with which words occur in a given corpus or text. Word frequency is a random variable with, as possible values, 1,2,3, …, N, with N the size of the corpus.

  • familiarity rating Participants are asked to indicate on a seven-point scale how frequently they think words are used. The ratings elicited for a given word will vary from participant to participant, and constitute a random variable.

  • lexical decision Participants are asked to indicate, by means of button presses, whether a word presented visually or auditorily is an existing word of the language. There are two outcomes, and hence two random variables, for this type of experiment: the accuracy of a response (with levels “correct” and “incorrect”) and the latency of the response (in milliseconds).

Information

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Book purchase

Temporarily unavailable

Save book to Kindle

To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×