File:StratifiedPoints.gif

Summary

Description
English: (*The stratification process redistributes the random elements into a \

relatively homogeneous group and then samples randomly. Every element \ in the original set is uniquely reassigned to one stratum.*) \ tinyColor[color_, point_] := {PointSize[Small], color, Point[point]} colorChoose[point_] := tinyColor[Blue, point]

Clear[r, n]; r = 100; n = r^2; darts = RandomReal[{0, 1}, {n, 2}]; coloredDarts = ParallelMap[colorChoose, darts];

Clear[smoothedDarts, tempPoints] subGrouper = Table[i, {i, 0, r - 1}]; shiftyGuy = Flatten[Tuples[subGrouper, 2]]; tempPoints = Partition[(shiftyGuy + Flatten[darts])*(1/r), 2];

smoothedDarts = RandomSample[tempPoints, n];

Export["~/Desktop/stratifiedPoints.gif",

Table[ListPlot[Part[smoothedDarts, 1 ;; max], AspectRatio -> 1, 
  PlotStyle -> {PointSize[Small], Blue}, 
  PlotRange -> {{0, 1}, {0, 1}}, 
  PlotLabel -> 
   TraditionalForm[max "Randomly Selected Stratified Points"], 
  Frame -> True, ImageSize -> {400, 400}], {max, 100, Length[darts], 
  Length[darts]/100}], 
"DisplayDurations" -> ConstantArray[1, 9]~Join~{3}]
Date
Source Own work
Author Caitlin Jo Ramsey
Camera location38° 54′ 14.56″ N, 77° 02′ 53.31″ W Kartographer map based on OpenStreetMap.View this and other nearby images on: OpenStreetMapinfo
Category:Files with coordinates missing SDC location of creation

(*This mathematical image was created with Mathematica. The stratification process redistributes the random elements into a \ relatively homogeneous group and then samples randomly. Every element \ in the original set is uniquely reassigned to one stratum. Source code for this image is available below.*) \ tinyColor[color_, point_] := {PointSize[Small], color, Point[point]} colorChoose[point_] := tinyColor[Blue, point]

Clear[r, n]; r = 100; n = r^2; darts = RandomReal[{0, 1}, {n, 2}]; coloredDarts = ParallelMap[colorChoose, darts];

Clear[smoothedDarts, tempPoints] subGrouper = Table[i, {i, 0, r - 1}]; shiftyGuy = Flatten[Tuples[subGrouper, 2]]; tempPoints = Partition[(shiftyGuy + Flatten[darts])*(1/r), 2];

smoothedDarts = RandomSample[tempPoints, n];

Export["~/Desktop/stratifiedPoints.gif",

Table[ListPlot[Part[smoothedDarts, 1 ;; max], AspectRatio -> 1, 
  PlotStyle -> {PointSize[Small], Blue}, 
  PlotRange -> {{0, 1}, {0, 1}}, 
  PlotLabel -> 
   TraditionalForm[max "Randomly Selected Stratified Points"], 
  Frame -> True, ImageSize -> {400, 400}], {max, 100, Length[darts], 
  Length[darts]/100}], 
"DisplayDurations" -> ConstantArray[1, 9]~Join~{3}]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#StratifiedPoints.gifCategory:Self-published work
Category:Clustering illusion Category:Variance reduction Category:Animated GIF files
Category:Animated GIF files Category:CC-BY-SA-3.0 Category:Clustering illusion Category:Files with coordinates missing SDC location of creation Category:PNG created with Mathematica Category:Self-published work Category:Variance reduction