TITLE: Certain signed sum over $S_n$
QUESTION [9 upvotes]: The following question appeared in my research:
Let $G_1,G_2,G_3$ all be subgroups of $S_n$, and consider the sum
$$
\sum_{g_i \in G_i, g_1g_2g_3 = id} \epsilon(g_1)
$$
that is, we only consider triplets whose product is the identity permutation,
and we sum all the signs of $g_1$.
The question is: is this sum always non-negative?
EDIT: 
What if we restrict $G_1$ to be the entire $S_n$? 
What if we restrict $G_2$ and $G_3$ to be groups of type $G_T=\{\sigma \in S_n : c(\sigma) \leq T \}$ where $c$ indicates the cycle type, and $T$ is a fixed set partition, and the inequality indicates refinement.
Update
Even with the updated version of subgroups, there is a counter-example.
The three set partitions
$$S=((1, 2, 3, 4), (5, 6, 7, 8)) \quad
T=((1, 5),(2, 8),(3, 6),(4, 7)) \quad U=((1, 6),(2, 4, 5),(3, 7, 8))$$
give rise to a sum with value $-4$.

REPLY [19 votes]: If $G_1 = S_n$ as in your edit, then every pair $(g_2,g_3) \in G_2 \times G_3$ occurs exactly once in the sum, and for each such summand we have $\epsilon(g_1) = \epsilon(g_2g_3)$. So the sum simplifies to
$$\sum_{g_2 \in G_2}\sum_{g_3 \in G_3} \epsilon(g_2g_3) = \left( \sum_{g_2 \in G_2} \epsilon(g_2)\right)\left(\sum_{g_3 \in G_3} \epsilon(g_3)\right)$$
which is nonnegative by the following observation: if $G \subset S_n$ is a subgroup, then the sum $\sum_{g \in G} \epsilon(g)$ is either $0$ or $\vert G \vert$, depending on whether the map $\epsilon \colon G \to \{\pm 1\}$ is trivial or not.