Density of Earth
Dataset from Cavendish's experiments which measured the density of the earth relative to the density of water.
In 1798, Henry Cavendish conducted experiments to indirectly calculate the gravitational constant in Newton's law of universal gravitation between two bodies having mass
M = m_1 and
m = m_2,
M is the earth's mass,
G is the gravitational constant, and
r is the distance between the two center of masses. If the earth is modeled as a sphere having radius
R, Newton's law may be expressed
$ npm install datasets-cavendish-density-of-earth
For use in the browser, use browserify.
var data = ;
Raw dataset from Cavendish's experiments which measured the density of the earth relative to the density of water.
console;// returns [ 5.5, 5.61, 4.88, ... ]
console;// returns [ 5.5, 5.61, 5.88, ... ]
While conducting his measurements, Cavendish changed his experimental apparatus after the sixth measurement. To remove confounding factors, an edited dataset is included which sets the first
6 values as missing values encoded as
console;// returns [ null, null, ..., 5.36, ... ]
- All measurement values are unit-less, as they are relative measures.
var mean =data = ;// Remove the missing values from the edited dataset...for var i = 0; i < 6; i++dataedited;// Calculate the sample means of each dataset...console;// returns ~5.448 => true value is 5.517console;// returns ~5.482 => true value is 5.517console;// returns ~5.483 => true value is 5.517
To run the example code from the top-level application directory,
$ node ./examples/index.js
- Cavendish, Henry. (1798). "Experiments to determine the density of the earth." Philosophical Transactions of the Royal Society of London, 88 (Part II), 469-527. Reprinted in A. S. Mackenzie (ed.), The Laws of Gravitation, 1900, New York: American.
- Stigler, Stephen M. (1977), "Do robust estimators work with real data?", Annals of Statistics, 5, 1055-1098.
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a
./reports/coverage directory. To access an HTML version of the report,
$ make view-cov
Copyright © 2015. The Compute.io Authors.