Skip to content

Commit

Permalink
catches populations of different sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasalmeida committed Oct 11, 2023
1 parent f580f8b commit ab1a443
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions functions/testFunctions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ async function rankSumTest(parms){
// let st=await import('https://esm.sh/[email protected]')
// let z = st.tTestTwoSample(parms.population1,parms.population2)
// return `the comparison of population [${parms.population1}] with [${parms.population2}] by a rank sum test assigns a p = ${st.cumulativeStdNormalProbability(z)} to the null hypothesis that they are similar`
let wcTest = wilcoxon(parms.population1,parms.population2)
wcTest.pValue
return `the comparison of population [${parms.population1}] with [${parms.population2}] by Wilcoxon Rank Sum Test assigns a p = ${wcTest.pValue} to the null hypothesis that they are similar`
if(parms.population1.length!=parms.population2.length){
return `please compare populations of the same size`
}else{
let wcTest = wilcoxon(parms.population1,parms.population2)
wcTest.pValue
return `the comparison of population [${parms.population1}] with [${parms.population2}] by Wilcoxon Rank Sum Test assigns a p = ${wcTest.pValue} to the null hypothesis that they are similar`
}
}

const rankSumTestDescription = { // at NCI Shady Grove
Expand Down

0 comments on commit ab1a443

Please sign in to comment.