- This topic has 6 replies, 2 voices, and was last updated 1 week, 2 days ago by
Lee Creighton.
-
AuthorPosts
-
Lee Creighton
ParticipantSo I’d like to replicate the nonparametric test shown in the PDF (which is from a 1979 NCTM Yearbook Teaching Statistics and Probability). The second attached file is my CODAP file of, I guess, a similar, non-ranked illustration. At any rate, the data is in that CODAP file.
Mainly, to replicate the test in the book, I first need to assign ranks to the data. Is there a function in CODAP that does this?
I’d then need to calculate the sums of ranks for 35 different arrangements of the data, and I think I’m out of steam on figuring that out.
December 1, 2025 at 9:21 pm #14053
Dan DamelinKeymasterHi Lee,
Sorry for the delay. We’ve been trying to be more aggressive about stopping spam before it appears in the forum and I’m afraid your message got caught up in that.
I don’t see any CODAP document attached to your post. Can you create a share link and include that in a follow up?
December 1, 2025 at 9:30 pm #14054
Dan DamelinKeymasterAlso can you describe the statistical test you are trying to calculate? Might it be the Wilcoxon Rank-Sum (Mann-Whitney U) or the Wilcoxon Signed-Rank test?
December 1, 2025 at 9:35 pm #14055Lee Creighton
ParticipantSure thing! Here’s the CODAP shared link:
<span style=”caret-color: #1a202c; color: #1a202c; font-family: Roboto, sans-serif; font-size: medium; white-space: pre;”>https://codap3.concord.org/beta#shared=https%3A%2F%2Fcfm-shared.concord.org%2FtrUDBOSELzjrtQohaW2I%2Ffile.json</span>
And a link to the PDF:
December 1, 2025 at 9:38 pm #14056Lee Creighton
ParticipantThe test is equivalent to a Mann-Whitney, but my question is more about finding rankings and computing the distribution of ranks. The PDF explains why there are 35 arrangements for this small data set, which give a probability distribution for the test statistic. I doubt there’s a way to produce the exact probability distribution, but *maybe* there’s a way to generate ranks and use the scrambler to make one.
I mean, I know this is pushing the limits.
December 1, 2025 at 10:10 pm #14057
Dan DamelinKeymasterI too thought of the Scrambler, but because we don’t have a ranking function, I tried making this using the Sampler. I set up two devices and sample them without replacement, so we get any number of MPH and Year pairings. You are right that we can’t automate doing the exact number of unique permutations, but one might argue that understanding if we had lots of samples where we randomly pair MPH and Year, and then calculate the rank sum we will get a sense of how likely our Actual Rank Sum compares. This CODAP doc does that.
I used a special variable we have called caseindex, which provides the rank as long as we have sorted them. Then we can calculate the rank sum, or the difference as you did in your example.
Does this help get closer to what you want? (If we had a rank() function then this could be done simpler using the Scrambler.
December 5, 2025 at 11:41 am #14058Lee Creighton
ParticipantThis is *fantastic* Dan. I’m so new to CODAP that I haven’t really explored all the plugins yet, so using the Sampler is fantastic.
In fact, I’d say it’s *better*. I don’t really care that students get into the nitty-gritty details of counting cases, just that they get the point that we can generate a sampling distribution from the data itself without resorting to the recipes they learn for parametric tests.
I used to do this kind of thing in JMP, but it required scripting back in my day. And, of course, a rank() function!
-
AuthorPosts
- You must be logged in to reply to this topic.