# R Dataset / Package HistData / MichelsonSets

Webform
Help

## Description

Describes how to create a bar plot based on count data. For an example of count data, see the email50 curated data set which was taken from the Open Intro AHSS textbook (not affiliated). An example of count data in this dataset would be the spam column.

## Usage

Select one (1) column to create its barplot and then click 'Submit'. If you do not choose count data, you may get unexpected results.

Students may also be interested in creating barplots for contingency tables.

For a stacked side-by-side barplot, see the other barplot app.

Category

Webform
Help

## Usage

Select 1 (one) column from a contingency table like the Gender and Politics or VADeaths curated datasets.

If you do not choose a contingency table, you may get unexpected results. You can import a dataset if you are logged-in.

## Details

Shows the student how to create a single stacked bar plot based on a column in a contingency table.

For a basic barplot (single column) based on count data see the count data barplot app.

For a stacked side-by-side barplot see the other stacked barplot app for categorical data.

Category

Webform
Help

## Usage

Select 1 (one) column from a contingency table. If you don't have your own dataset, you can choose the Gender and Politics or VADeaths curated datasets. If a contingency table is not chosen, you may get unexpected results.

A contingency table has columns like a regular dataset, but the first row contains row names that categorize and "split-up" the dataset. An example of a contingency table would be something like this:

LIBERAL CONSERVATIVE
F 762 468
M 484 477


This contingency table is take from the Gender and Politics dataset. You can get a preview by selecting the dataset from the Curated Data dropdown above.

## Details

This app shows the student how to create a pie chart from a contingency table by hand using a Quadstat dataset.

A pie chart shows proportions of a sample or population. Each piece of a pie chart corresponds to some subset of the sample or population. In this case, we will use the contingency table rows to subset the sample.

Students may also want to view the app for creating a pie chart from count data.

Category

Webform
Help

## Usage

Click "Submit" after selecting one column to see how to compute the arithmetic mean (average) of data (vectors).

## Description

If all the values of a sample were plotted on a number line, the average would be the point in the middle that would balance the two sides.

The average is greatly influenced by outliers, meaning extreme points can pull the average to the left or right.

If we are referring to the average of population (all observations), the symbol for the average (arithmetic mean) is $\mu$.

If we are referring to the average of a sample (a subset of the population), the symbol for the average (arithmetic mean) is $\bar{x}$.

## Computing the average

Suppose we have a sample consisting of $x_1, x_2, x_3,...,x_n$. This means we have $n$ observations. Then,

$$\bar{x}=\frac{x_1, x_2, x_3,...,x_n}{n}.$$

The formula tells us that we need to add all the observations and then divide by the number of observations to compute the mean.

## Example 1

Compute the mean of $A = \{1,2,3\}$.

$$\bar{x} = \frac{1+2+3}{3} = 2.$$
Category

Webform
Help

## Usage

Select two columns which are to be used in the scatterplot. The first column clicked will be the independent variable (X-axis).

## Description

This web application describes how to create a scatterplot of two dataset variables plotted on the xy-axes.

Category

Webform
Help

## Median Value

### Description

Compute the sample median.

### Usage

median(x, na.rm = FALSE, ...)


### Arguments

 x an object for which a method has been defined, or a numeric vector containing the values whose median is to be computed. na.rm a logical value indicating whether NA values should be stripped before the computation proceeds. ... potentially further arguments for methods; not used in the default method.

### Value

The default method returns a length-one object of the same type as x, except when x is logical or integer of even length, when the result will be double.

If there are no values or if na.rm = FALSE and there are NA values the result is NA of the same type as x (or more generally the result of x[FALSE][NA]).

### References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Category

## Boxplot

Submitted by pmagunia on April 22, 2018 - 3:07 PM

## Correlation Coefficient

Submitted by pmagunia on April 22, 2018 - 3:08 PM

## Cumulative Frequency Histogram

Submitted by pmagunia on April 22, 2018 - 3:09 PM

## Dotplot

Submitted by pmagunia on April 22, 2018 - 3:10 PM

## Hollow Histogram

Submitted by pmagunia on April 22, 2018 - 3:10 PM

## Mean

Submitted by pmagunia on April 22, 2018 - 3:11 PM

## Pie Chart

Submitted by pmagunia on April 22, 2018 - 3:11 PM

## Plot

Submitted by pmagunia on April 22, 2018 - 3:07 PM

## Regression

Submitted by pmagunia on April 22, 2018 - 3:12 PM

## Stem and Leaf Plots

Submitted by pmagunia on April 22, 2018 - 3:12 PM

## Summary

Submitted by pmagunia on April 22, 2018 - 2:51 PM

## Visual Summaries

Submitted by pmagunia on April 22, 2018 - 3:13 PM
Submitted by pmagunia on March 9, 2018 - 1:06 PM
Attachment Size
439 bytes
Documentation

## Michelson's Determinations of the Velocity of Light

### Description

The data frame Michelson gives Albert Michelson's measurements of the velocity of light in air, made from June 5 to July 2, 1879, reported in Michelson (1882). The given values + 299,000 are Michelson's measurements in km/sec. The number of cases is 100 and the "true" value on this scale is 734.5.

Stigler (1977) used these data to illustrate properties of robust estimators with real, historical data. For this purpose, he divided the 100 measurements into 5 sets of 20 each. These are contained in MichelsonSets.

### Usage

data(Michelson)
data(MichelsonSets)


### Format

Michelson: A data frame with 100 observations on the following variable, given in time order of data collection

velocity

a numeric vector

MichelsonSets: A 20 x 5 matrix, with format int [1:20, 1:5] 850 850 1000 810 960 800 830 830 880 720 ... - attr(*, "dimnames")=List of 2 ..$: NULL ..$ : chr [1:5] "ds12" "ds13" "ds14" "ds15" ...

### Details

The "true" value is taken to be 734.5, arrived at by taking the "true" speed of light in a vacuum to be 299,792.5 km/sec, and adjusting for the velocity in air.

The data values are recorded in order, and so may also be taken as a time series.

### Source

Kyle Siegrist, "Virtual Laboratories in Probability and Statistics", http://www.math.uah.edu/stat/data/Michelson.html

Stephen M. Stigler (1977), "Do robust estimators work with real data?", Annals of Statistics, 5, 1055-1098

### References

Michelson, A. A. (1882). "Experimental determination of the velocity of light made at the United States Naval Academy, Anapolis". Astronomical Papers, 1,109-145, U. S. Nautical Almanac Office.

morley for these data in another format

### Examples

data(Michelson)# density plot (default bandwidth & 0.6 * bw)
plot(density(Michelson$velocity), xlab="Speed of light - 299000 (km/s)", main="Density plots of Michelson data") lines(density(Michelson$velocity, adjust=0.6), lty=2)
rug(jitter(Michelson$velocity)) abline(v=mean(Michelson$velocity), col="blue")
abline(v=734.5, col="red", lwd=2)
text(mean(Michelson$velocity), .004, "mean", srt=90, pos=2) text(734.5, .004, "true", srt=90, pos=2)# index / time series plot plot(Michelson$velocity, type="b")
abline(h=734.5, col="red", lwd=2)
lines(lowess(Michelson$velocity), col="blue", lwd=2)# examine lag=1 differences plot(diff(Michelson$velocity), type="b")
lines(lowess(diff(Michelson\$velocity)), col="blue", lwd=2)# examine different data sets
boxplot(MichelsonSets, ylab="Velocity of light - 299000 (km/s)", xlab="Data set")
abline(h=734.5, col="red", lwd=2)# means and trimmed means
(mn <-apply(MichelsonSets, 2, mean))
(tm <- apply(MichelsonSets, 2, mean, trim=.1))
points(1:5, mn)
points(1:5+.05, tm, pch=16, col="blue")
--

Dataset imported from https://www.r-project.org.