<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>You want a Wilconxon test.  Here is an example for R.<br><br># Load necessary libraries<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>library(ggplot2)  # For plotting<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>library(stats)   # For statistical tests (base R)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># Example data (replace with your actual data)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># admitted_ids &lt;- c(1, 3, 5, 7, 10, 12)  # Example admitted student IDs<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># waitlisted_ids &lt;- c(15, 18, 20, 22, 25, 30)  # Example waitlisted student IDs<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># Combine data into a data frame for plotting<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>data &lt;- data.frame(<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  ID = c(admitted_ids, waitlisted_ids),<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  Status = factor(c(rep(&quot;Admitted&quot;, length(admitted_ids)), <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>                    rep(&quot;Waitlisted&quot;, length(waitlisted_ids))))<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 1. Plot histograms with density<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>ggplot(data, aes(x = ID, fill = Status)) +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  geom_histogram(aes(y = ..density..), alpha = 0.5, position = &quot;identity&quot;) +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  labs(title = &quot;Distribution of Student IDs&quot;, x = &quot;Student ID&quot;, y = &quot;Density&quot;) +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  theme_minimal()<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 2. Box plot to compare medians and spread<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>ggplot(data, aes(x = Status, y = ID, fill = Status)) +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  geom_boxplot() +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  labs(title = &quot;Box Plot of Student IDs by Status&quot;, y = &quot;Student ID&quot;) +<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>  theme_minimal()<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 3. Mann-Whitney U Test (non-parametric, good for skewed data)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>mw_test &lt;- wilcox.test(admitted_ids, waitlisted_ids, alternative = &quot;two.sided&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(&quot;Mann-Whitney U Test:&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(mw_test)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 4. Kolmogorov-Smirnov Test (compare distributions)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>ks_test &lt;- ks.test(admitted_ids, waitlisted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(&quot;Kolmogorov-Smirnov Test:&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(ks_test)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 5. Compare means<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>mean_admitted &lt;- mean(admitted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>mean_waitlisted &lt;- mean(waitlisted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>cat(&quot;Mean ID (Admitted):&quot;, mean_admitted, &quot;\n&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>cat(&quot;Mean ID (Waitlisted):&quot;, mean_waitlisted, &quot;\n&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 6. Optional: T-Test (if data is roughly normal)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>t_test &lt;- t.test(admitted_ids, waitlisted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(&quot;Two-Sample T-Test:&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>print(t_test)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 7. Quantify skewness (requires 'moments' package)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># Install if needed: install.packages(&quot;moments&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>library(moments)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>skew_admitted &lt;- skewness(admitted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>skew_waitlisted &lt;- skewness(waitlisted_ids)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>cat(&quot;Skewness (Admitted):&quot;, skew_admitted, &quot;\n&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>cat(&quot;Skewness (Waitlisted):&quot;, skew_waitlisted, &quot;\n&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'># 8. Logistic regression (modeling probability of admission)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>model &lt;- glm(Status ~ ID, data = data, family = &quot;binomial&quot;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>summary(model)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>Friam &lt;friam-bounces@redfish.com&gt; on behalf of cody dooderson &lt;d00d3rs0n@gmail.com&gt;<br><b>Date: </b>Thursday, March 13, 2025 at 1:28\u202fPM<br><b>To: </b>The Friday Morning Applied Complexity Coffee Group &lt;friam@redfish.com&gt;<br><b>Subject: </b>[FRIAM] statistics question<o:p></o:p></span></p></div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt'>I have a question concerning preschool admissions. The kindergarten that my daughter went to for preschool has a &quot;random lottery&quot; for admissions. They published a list of all of the student ids of the students who got in and the ones who did not and were put on a waitlist.&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt'>She did not get in, so I decided that it was unfair and plotted the data. What statistical tricks should I use to figure out if the lottery was random or not? <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'>I have attached a plot of the data in question. To me, the plot looks slightly skewed towards the low numbers. The lower numbers are kids that signed up for the lottery earlier and I hypothesise have&nbsp; favorable connections in the school.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt'><img width=534 height=413 style='width:5.5625in;height:4.302in' id="_x0000_i1025" src="cid:ii_m87sueok1"><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'><br clear=all><o:p></o:p></span></p></div><div><div><div><p class=MsoNormal><span style='font-size:11.0pt'>_ Cody Smith _<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:11.0pt'><a href="mailto:d00d3rs0n@gmail.com">d00d3rs0n@gmail.com</a><o:p></o:p></span></p></div></div></div></div></div></div></body></html>