What is the goal of this formula? If you can write out the thing you are trying to solve that may be easier.
Looking at this formula it seems like what you are wanting it to do is set another field to be a certain number? If I have this right then your formula is not correct as you cannot just force another field to change the data in it like that. One way it would work is you would make [Sample Size] your formula field and have something like this in there:
If(
[ORDER QTY] >= 2 and [ORDER QTY] <= 8, 2,
[ORDER QTY] >= 9 and [ORDER QTY] <= 15, 3,
[ORDER QTY] >= 16 and [ORDER QTY] <= 25, 5,
[ORDER QTY] >= 26 and [ORDER QTY] <= 50, 8
)
I think that is what you are after. Then this [Sample Size] field would display the number based on the Order Quanity.
Marks formula also works. I just like to be really explicit with the numbers in my formulas usually. They should both work the exact same in the end I think.