How to find the class of a problem?
You have described an optimization problem, namely, find the arrangement that minimizes the average deviation from the mean. The decision version of this problem is, given an input to your problem and a value $T$, whether there exists an arrangement whose average deviation is at most $T$. This problem is in NP.

Whether it is NP-hard or not is for you to ponder. Combinatorial problems in NP tend to be either NP-hard or in P, so you should simultaneously try to prove that your problem is NP-hard via reduction from a known NP-hard problem, or to find an efficient algorithm for your problem.