I have a table called drugs with columns drug and result, how do I calculate the moving average of the result column by taking the first 4 rows followed by the next 4 rows and similarly continue. Pfa the sample table for reference.
JMP's support documentation gives some additional background for how the formula may be defined (defines the arguments and also includes some nice little examples): https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml#
You can find in Wikipedia (https://en.wikipedia.org/wiki/Moving_average) more on first principles and mathematical/ conceptual understanding behind the Moving Average Calculation: