I want to calculate chi square and p-value for proportions equality.
I would prefer to use standard library like math.net but not sure how to do it using documentation https://numerics.mathdotnet.com/api/MathNet.Numerics.Distributions/ChiSquared.htm.
In R, it is straight forward by,
prop.test(c(10,20,15), c(40,70,55))
3-sample test for equality of proportions without
continuity correction
data: c(10, 20, 15) out of c(40, 70, 55) X-squared = 0.16369, df = 2, p-value = 0.9214