[Question]
  [
## Getting the average of a list (e.g `[2,6,7]`)
* Get the length of the list: `[2,6,7] -> 3`
* Sum the numbers in the list: `2 + 6 + 7 = 15`.
* Divide the sum by their count: `15 / 3 = 5`.
You should compare the averages of two lists of *positive* integers **N** and **M**, by returning a value if **N** has a higher average, another value if **M** has a higher average, and another one in case of a tie.
---
# I/O rules
All the [standard Input and Output methods](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods) are allowed.
### Input
You may take input as two separate lists, a nested list, or anything else you consider suitable for the task. Please specify the format.
### Output
The values provided have to be distinct and must consist of at least one non-whitespace character. Also, they *must* be consistent between runs (a single value for **N**, a single value for **M**, a single value for **Tie**). Please specify those in your answer. The values can be non-empty Strings, Bool values, Integers, or anything you consider suitable.
---
# Specs
* The lists will not necessarily have equal length.
* You are guaranteed that the lists are non-empty.
---
# Test Cases
I chose the values `N wins`, `M wins` and `Tie`, which are pretty much self-evident.
```
N, M                     ->   Output     (Averages)
[7], [6]                 -> N wins  (N has 7, M has 6 )
[4,5], [4,4]             -> N wins  (N has 4.5, M has 4)
[2,3,4], [4,5,6]         -> M wins  (N has 3, M has 5)
[4,1,3], [7,3,2,1,1,2]   -> Tie     (both have 2.666...)
[100,390,1], [89,82,89]  -> N wins  (N has 163.666..., M has 86.666...)
[92,892], [892,92]       -> Tie     (lists are basically identical) 
[10,182], [12,78,203,91] -> Tie     (both have 96)
```
---
[Default Loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) apply. Explanations are encouraged! This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code in bytes wins!
  
[Answer]
## Mathematica, 15 bytes
```
Order@@Mean/@#&
```
[Try it online!](https://tio.run/##RY5BCoMwEEX3nmKgUNrywWSiNUGEXKC0V5BWqYu60OxCzp4mIrh7894MzK933@m9xjh2z@UzLNY@hn4u7encFm5Y3Uod@YK8bwL8PQRkrlCnqUK1zwyVOJsax46ESq5JjRNL8F6kEFBGQKaqDTRDmz2ZzLx5hjkOIHW2ktFosFAwMoQitPHyWqbZkb3ReKXS0vZy/AM "Mathics – Try It Online")
`Function` which expects a list of two lists. `Mean/@#` takes the arithmetic mean of each list in the input, then those means are passed into `Order`, which returns `-1` if the first list wins, `0` if there is a tie, and `1` if the second list wins.
[Answer]
# JavaScript (ES6), ~~52~~ 50 bytes
*(Saved 2 bytes thanks to @Shaggy.)*
Here are two 50-byte solutions:
```
f=(N,M,a=eval(N.join`+`)/N.length)=>M?(a-f(M))/0:a
(N,M,A=a=>eval(a.join`+`)/a.length)=>(A(N)-A(M))/0
```
Returns **Infinity** for N, **-Infinity** for M, and **NaN** for a tie.
The first solution may require a bit of explanation due to the recursion:
On the first call to the function, `a` is initialized as the average of the `N` array:
```
a=eval(N.join`+`)/N.length
```
`M` has a value at this point, so the first part of the conditional expression is called:
`M ? (a-f(M))/0 : **a** 
 ----------`
The function is called within this expression, this time substituting `M` for `N`.
On this second call to the function, `a` is initialized as the average of `N` –– which was `M` in the previous call.
Since there is no second parameter during this call to the function, the second part of the conditional expression is triggered, which returns the average:
`M ? (a-f(M))/0 : **a** 
 --`
We can now understand the expression better:
```
(a - f(M)) / 0
```
It's:
```
(the average of N  minus  the average of M) divided by 0
```
The difference between the averages will be a positive number, a negative number, or 0.
Dividing the difference by 0 results in **Infinity**, **-Infinity**, or **NaN** – providing the three distinct values as required.
**Test Cases:**
```
f=(N,M,a=eval(N.join`+`)/N.length)=>M?(a-f(M))/0:a
console.log(f([7], [6]                 )) // N wins  (N has 7, M has 6 )
console.log(f([4,5], [4,4]             )) // N wins  (N has 4.5, M has 4)
console.log(f([2,3,4], [4,5,6]         )) // M wins  (N has 3, M has 5)
console.log(f([4,1,3], [7,3,2,1,1,2]   )) // Tie     (both have 2.666...)
console.log(f([100,390,1], [89,82,89]  )) // N wins  (N has 163.666..., M has 86.666...)
console.log(f([92,892], [892,92]       )) // Tie     (lists are basically identical) 
console.log(f([10,182], [12,78,203,91] )) // Tie     (both have 96)
```
[Answer]
# Mathematica, 21 bytes
```
Sign[Mean@#-Mean@#2]&
```
1 for `#` wins, -1 for `#2` wins, 0 for tie.
[Answer]
# [MATL](https://github.com/lmendo/MATL), 8 bytes
Soooo many modifiers (`Y` and `Z`). I can't find a way to make it shorter. `sum / number_of_elements` is three bytes. It might be a better way to do `-ZS`, but I can't find one. 
```
YmiYm-ZS
```
[Try it online!](https://tio.run/##y00syfn/PzI3MzJXNyr4//9oEx1DHeNYrmhzHWMdIyDbUMcoFgA "MATL – Try It Online")
```
           % Take first input implicitly
Ym         % Mean of that input
  i        % Grab second input
   Ym      % Mean of that input
     -     % Subtract
      ZS   % Sign
```
Returns `1` if the first input is larger, `0` if they tie, and `-1` if the second input is larger.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 9 bytes
**1** if `M` wins, **-1** if `N` wins and **0** for a tie.
```
vyOyg/}.S
```
[Try it online!](https://tio.run/##MzBNTDJM/f@/rNK/Ml2/Vi/4///oaBMd01gdBSBlEhsLAA "05AB1E – Try It Online")
**Explanation**
```
v           # for each y in list of lists
 yO         # sum y
   yg       # get length of y
     /      # divide
      }     # end loop
       .S   # compare
```
[Answer]
# [Julia](https://julialang.org/), 27 bytes
```
(x,y)->cmp(mean(x),mean(y))
```
[Try it online!](https://tio.run/##ZYxBCsIwEEX3nsJlAl/ITBKTLPQipYsiFiptKVKhPX1M4kbS1TDvvZnXZxw6G/tbFBt2ebk/pkVMz24Wm0SZu5RxeQ/zOs6iF41rcW6urZSnP2hgMzYwlWDoxIqyOF4RdJYuVZwWAlcJKQUdFChnPsAzfKiakBn/AkY4vgD5oonhPFhpBEpR/AI)
Returns `1` if the first average is larger, `-1` if second is, and `0` if they tie.
[Answer]
# [Actually](https://github.com/Mego/Seriously), 5 bytes
```
♂æi-s
```
[Try it online!](https://tio.run/##S0wuKU3Myan8///RzKbDyzJ1i///j442NDDQUTC2BBKGsToK0RaWOgoWRkBsGRsLAA "Actually – Try It Online")
`1` for `N > M`, `0` for `N = M`, `-1` for `N < M`.
Explanation:
```
♂æi-s Takes input in format [N, M]
♂æ    Map average
  i   Dump to stack in reverse
   -  Subtract
    s Get sign
```
[Answer]
# [Python 2](https://docs.python.org/2/), 43 bytes
```
lambda p:cmp(*[sum(l)*1./len(l)for l in p])
```
[Try it online!](https://tio.run/##JYpBDoIwFET3nqJLSn60/xekJfEktQtUiCSlNAgxnr62sJqZ9yb81vfsKQ63e3Td9Hh1LLTPKRSl@WxT4XiJ54vrfWrDvDDHRs@C5fH7Hl3PsA3L6Fc2FKMP21pwHk1jgZmrPZkK6lwrqNIgkCn3WcNhEWQGTTKUBgIljEKA1AIwK6VBESiduM5JByTQxxVQ7QgJGgUkJGi0fw "Python 2 – Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 27 bytes
```
@(x,y)sign(mean(x)-mean(y))
```
[Try it online!](https://tio.run/##JYo7DoMwEET7nILSKw0WuzafFEi5B3KBECAKoAiK4PRmcaqZ92b24eh/Y5xaa238mBMXfZd5M@vYb@akPOVFFCfTeZQBmYYP9FIWOK3JlKhClqQHwz2y1lUUGPK/cwFu5JlYUDeQwuHNgeIN "Octave – Try It Online")
Takes two vectors `x.y` as input, takes the `mean` of both vectors, and subtract one from the other. Get the sign of this, to get `1`, `0` and `-1` for the three different alternatives.
[Answer]
# Python 2, 49 bytes
```
lambda N,M:cmp(1.*sum(N)/len(N),1.*sum(M)/len(M))
```
[**Try it online**](https://tio.run/##LYpBDoIwEEXXcgqWhfxoZwBpSTwCXABZoEIggUoUYjw9Furqz3tvpu/cPQ2v7eW6DvV4e9R@gTy7j5OgY/heRlEEp6ExdvAXuRN5EKyfrh8anzLvML16M4tWhL2ZllkENpZpBb88V14ZI9nOGLEFRmR3xwSuEqJNpLawBQJbTVIi0hK0JaWhGEpbr7dlJxnavYLUroiRKrCMoKn6AQ)
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 11 bytes
Prompts for a list of two lists. Prints `1` if the left has higher average, 0 if they have the same average, and `¯1` if the right has higher average.
```
×-/(+/÷≢)¨⎕
```
[Try it online!](https://tio.run/##fc0xCsJAEAXQ3lP8MouKO5NodmMlnkRQoxBJ0CB4ArXQTqxsrOxsBHtzk71I3BVExOBUw8ybP4MsaQ5XgySNS7NZ99NZ1lvGi7I4NltevVXczfYsHhezP7h1aXYnUJSMxnkXMsqnoy4eV4rm03iS1/Cqd0TNa4QCXqMj8FU/LEDbOja7WyD@QoYPS9wBPqkVeQTfstBytj2BRQUjKeFrCbJUaSiG0uKXaTfnl2G4pvop2SDlGDFCBZY@NIkn "APL (Dyalog Unicode) – Try It Online")
`⎕` prompt
`(`…`)¨` apply the following tacit function to each:
 `+/` the sum
 `÷` divided by
 `≢` the tally
`-/` insert (and evaluate) a minus between them
`×` signum
[Answer]
# Javascript, ~~81~~ ~~66~~ ~~58~~ 56 bytes
*saved 15 bytes thanks to Luke*
*saved 2 bytes thanks to Justin Mariner*
```
n=>m=>Math.sign((a=b=>eval(b.join`+`)/b.length)(m)-a(n))
```
Tie is 0, M is 1 and N is -1. Called using currying syntax, eg. `f([7])([6])`
[Answer]
# [PHP](https://php.net/), 68 bytes
```
<?foreach($_GET as$v)$r[]=array_sum($v)/count($v);echo$r[0]<=>$r[1];
```
[Try it online!](https://tio.run/##K8go@G9jX5BRwKUS7@4aYqsQHW1ooGNoYRSroxBtaKRjbqFjZGCsY2kYG2v9Py2/KDUxOUMDrFQhsVilTFOlKDrWNrGoKLEyvrg0VwMoop@cX5pXAmJZpyZn5AMVGMTa2NoBaUOgEf8B "PHP – Try It Online")
# [PHP](https://php.net/), 69 bytes
```
<?=($s=array_sum)($a=$_GET[0])/count($a)<=>$s($b=$_GET[1])/count($b);
```
[Try it online!](https://tio.run/##K8go@G9jX5BRwKUS7@4aYqsQHW1ooGNoYRSroxBtaKRjbqFjZGCsY2kYG2vNZW8HVGuroVJsm1hUlFgZX1yaq6mhkmgL1hptEKupn5xfmlcCFNK0sbVTKdZQSYLKGSLkkjSt//8HAA "PHP – Try It Online")
[spaceship operator](http://php.net/manual/en/language.operators.comparison.php)
-1 less then , 0 tie , 1 greater then
[Answer]
# Haskell, ~~65~~ 43 Bytes
*Saved 22 bytes thanks to nimi!*
```
a x=sum x/sum[1|_<-x] 
x#y=compare(a x)$a y
```
~~There has to be a much better way... But type conversions screwed me.~~
**Usage**
```
(#) [7] [6]
```
Returns `GT` if the first argument wins, `LT` if the second argument wins, and `EQ` if they tie.
[Try it online!](https://tio.run/##hdHLasMwEAXQfb7iQrKwYeJasi1bUH9CsuouiKIkhoj6ESK3taH/7spu00eSUi2GWUiHe9FB26eiLIdBo8vtc4Xuzs0Ne3u8X3YKs27e57umOupT4bkr/kKjHyptauTYNzPgeDJ1iwW8uY9NqrARCpdnucQar6a2gLfGQVukhNW0CPiXSEyJGmes/kHiIDkz8ZXCKRqFUaMfkZyy@q1EZyO5kYRR5IzUWdztjLj6MB5MMXHetmkP7vVLAR4IIYIguFJYGFIkQ2JOyiRlnDKpbvVhIvo0zpEy8RcqR4VPIifJ1Xe9r2ilsa2F@zhstTU7XZY9zL6o23H3cR2TWDaKjFOaEQ8jki7y7bJS@MM7)
[Answer]
# J, 10 bytes
```
*@-&(+/%#)
```
One list given on the left, one on the right. Will return \_1 if the left average is smaller, 1 if it's bigger, and 0 if they're equal
* `(+/%#)` is a standard J fork for calculating the average of a list
* `&` provides a variation on the dyadic fork. it applies the right side (the average verb, in this case) to both arguments, and then passes them along to the verb on the left side, which in this case is...
* `*@-` subtract followed by "sign of": so the right avg is subtracted from the left, and we are given the sign of the result -- \_1, 1, or 0
[Answer]
# **Pyth, ~~10~~ ~~8~~ ~~7~~ 6 bytes**
Thanks @isaacg for saving a byte
```
._-F.O
```
Input is taken as a nested list, `[N, M]`. Outputs `-1` if `N < M`, `1` if `N > M` and `0` if they are equal.
[Try It Online](http://pyth.herokuapp.com/?code=._-F.O&test_suite=1&test_suite_input=%5B%5B7%5D%2C+%5B6%5D%5D%0A%5B%5B4%2C5%5D%2C+%5B4%2C4%5D%5D%0A%5B%5B2%2C3%2C4%5D%2C+%5B4%2C5%2C6%5D%5D%0A%5B%5B4%2C1%2C3%5D%2C+%5B7%2C3%2C2%2C1%2C1%2C2%5D%5D%0A%5B%5B100%2C390%2C1%5D%2C+%5B89%2C82%2C89%5D%5D%0A%5B%5B92%2C892%5D%2C+%5B892%2C92%5D%5D%0A%5B%5B10%2C182%5D%2C+%5B12%2C78%2C203%2C91%5D%5D&debug=0)
[Answer]
## TI-Basic, ~~25~~ ~~21~~ ~~13~~ ~~12~~ 10 bytes
-2 bytes thanks to lirtosiast
```
:tanh(ᴇ9mean(L₁-mean(L₂
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
S÷Lµ€IṠ
```
A monadic link accepting a list of the two lists, `N,M` which returns:  
`[-1]` for `N`;  
`[1]` for `M`; and  
`[0]` for a tie.  
As a full program it prints the result (single item lists print their content only, so `-1`, `1`, or `0`).
**[Try it online!](https://tio.run/##y0rNyan8/z/48HafQ1sfNa3xfLhzwf///6MNDXQMLYxidRSiDY10zC10jAyMdSwNYwE "Jelly – Try It Online")**
### How?
```
S÷Lµ€IṠ - Link: list of lists, [N,M]
   µ€   - perform the chain to the left for €ach (of N, M)
S       -   sum
  L     -   length
 ÷      -   divide (yields the average)
     I  - incremental differences (yields [avg(M) - avg(N)])
      Ṡ - sign (yields: [1] if avg(M)>avg(N); [-1] if avg(N)>avg(M); or [0] if equal)
```
[Answer]
# [Perl 6](http://perl6.org/), 25 bytes
```
{sign [-] .map:{.sum/$_}}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/ujgzPU8hWjdWQS83scCqWq@4NFdfJb629r@1QnFipUKahoaNoYKRgrGdjoINkFIwsdPU/A8A "Perl 6 – Try It Online")
Takes a single argument, a two-element list of lists of numbers. Returns `1` if the first list has a greater average, `-1` if the second list does, and `0` if the averages are equal.
[Answer]
# JavaScript (ES6), 60 bytes
```
a=>(b=(c=a.map(d=>eval(d.join`+`)/d.length))[0])-c[1])?b>0:0
```
Outputs `0` for `Tie`, `true` for `N` and `false` for `M`.
[Answer]
# JavaScript (ES6), ~~60~~ 54 bytes
*-6 bytes thanks to @Luke and @Neil*
```
(i,[x,y]=i.map(v=>eval(v.join`+`)/v.length))=>y-x&&x>y
```
Takes input as a 2-element array `[N, M]`. Outputs `true`, `0`, or `false` for `N`, `Tie`, or `M`, respectively.
## Explanation
```
(i,                 // input array: [N, M]
    [x,y] =         // destructure assignment: set x and y to...
    i.map(v=>       // the input values mapped as...
        eval(v.join`+`) // the sum, by joining the array with +
        / v.length      // divided by the length
    )
) => y-x && x>y     // return 0 for tie, or the result of avg(N) > avg(M)
```
## Test Snippet
Input numbers separated by spaces/commas.
```
f=
(i,[x,y]=i.map(v=>eval(v.join`+`)/v.length))=>y-x&&x>y
```
```
<div oninput="O.value=f([N.value,M.value].map(x=>x.split(/[ ,]+/)))">N <input id=N> M <input id=M></div>
Out: <input id=O disabled>
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 13 bytes
```
{$CM$+*a/#*a}
```
This is a function that takes a list of lists. Returns `1` if the first average is bigger, `-1` if the second is bigger, `0` if tied. [Run all test cases here.](https://tio.run/##RYoxDsIwEAT7vGKluApC@M4Ovqup8wLLRUoalB7x9uMcS9DNzuzxPMze4bGFy7Lf5mX/2FYn1Foa6r21jhmrj4w8JiM5drHi9yAkV8UTOxN4BIpIGkHeRCEM0RG0I5@aof83SZfEKAKOCUqemtn19QU "Pip – Try It Online")
### Background
This solution makes heavy use of two of Pip's metaoperators:
* `$`, fold. Take a binary operator and apply it between the elements of a list. For instance, `+` is addition, but `$+` sums a list. Note that `$` makes a binary operator into a unary operator.
* `*`, map. Take a unary operator and apply it to each element of a list. For instance, `#` gives the length of a list, but `#*` gives (a list of) the lengths of the list's items.
* These two metaoperators can be combined: `$+*` maps fold/plus over a list, summing each of the list's elements.
The other thing to know about Pip is that a lot of operators work item-wise on lists by default. For instance, `[1 2 3] * 5` gives `[5 10 15]`; `[1 2 3] * [2 3 4]` gives `[2 6 12]`; and `[[1 2] [3 4]] * [5 6]` gives `[[5 10] [18 24]]`.
### Explanation
We'll use an example input of `[[2 3 4] [2 3 4 6]]`:
* `{...}`  
Defines a function. The (first) argument is bound to the local variable `a`.
* `#*a`  
Map `#` to the function's argument, getting the lengths of the sublists. Result: `[3 4]`
* `a/#*a`  
Divide (the elements of) the sublists of `a` by their respective lengths. Result: `[[0.667 1 1.333] [0.5 0.75 1 1.5]]`
* `$+*a/#*a`  
Map `$+` (fold on addition) to that result, summing the sublists. Result: `[3 3.75]`
* `$CM$+*a/#*a`  
Fold on `CM`, which gives `-1`, `0`, or `1` depending on the comparison of its two operands (like Python's `cmp`). Result: `-1` (because `3` is smaller than `3.75`).
---
You can also define functions in Pip by writing expressions containing the identity function `_`. For example, `_*_` is a function that squares its argument--syntactic sugar for `{a*a}`, and fewer bytes. However, there's a bug in the current version of the interpreter that prevents `_` from working with the `*` metaoperator. Once that's fixed, this solution can be **11 bytes**: `$CM$+*_/#*_`.
[Answer]
# C (gcc), 91 ~~98~~ bytes
```
u,v,j;f(x,y,a,b)int*a,*b;{for(u=v=0;x--;u+=a[x])for(j=0;j<y;)v+=b[j++];j=u*y-v;x=j>0?2:!j;}
```
Wrong place for C and probably the only answer that doesn't need division. At least the code is displayed without a slider.
Return 0,1,2 for `M>N`, `M=N`, `M<N` respectively. Takes input as `length of M`, `length of N`, `M`, `N`.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 8 bytes
```
⟨+/l⟩ᵐ-ṡ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r//9H8Fdr6OY/mr3y4dYLuw50L//@PjjbRMY3VAZImsbH/owA "Brachylog – Try It Online")
Outputs `1` if the first list has a bigger average, `-1` is the second list has a bigger average, and `0` if they are tied.
### Explanation
```
     ᵐ        Map:
⟨   ⟩           Fork:
 +                Sum…
  /               …divided by…
   l              …length
       -      Subtract
        ṡ     Sign
```
[Answer]
# Java, 105 bytes
```
s->s.stream().map(l->l.stream().reduce((i,j)->i+j).get()/l.size()).reduce((i,j)->Math.signum(i-j)).get();
```
Lambda that takes a nested list, as per allowable inputs.
Streams the list of lists, converts both to their averages, then returns the sign of the difference. `1` if the first list is larger, `-1` if the second list is larger, `0` for a tie.
[Answer]
# R 38 34 bytes
```
function(a,b)sign(mean(a)-mean(b))
```
Function that takes as input two numeric vectors. Returns 1 if first list average is higher, 0 if they are the same and -1 if second list average is higher.
[Answer]
# [MATL](https://github.com/lmendo/MATL), 6 bytes
Don't be so mean!\*
```
!-ssZS
```
Input stack order: 
```
M
N
```
Output:
```
 1 = N wins  
-1 = M wins  
 0 = tie
```
[Try it online!](https://tio.run/##y00syfn/X1G3uDgq@P//aBMdUx0zMDaJ5Yo20jEG0gA "MATL – Try It Online")
```
!-ssZS
========
!           % transpose M
 -          % N - M^T using elementwise subtraction and implicit expansion
  s         % sum columns of the result
   s        % sum the resulting row vector
    ZS      % sign of the sum
```
\*This answer was golfed without being mean to any poor, defenseless numbers.
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), ~~76~~ 62 bytes
```
a->b->Math.signum(a.average().orElse(0)-b.average().orElse(0))
```
[Try it online!](https://tio.run/##bZJRb4IwEMff/RQXE5N2wQacmzA3kyXbkj345N6MD0WLq4OWtMXELHx2dxbcFoUCLf/73b/NcTu@50NdCrXbfB1lUWrjYIcaq5zM2c20d6VllVo7qVVn0DojeHEKlVWayzWsc24tzLlU8N0DaFXruMNpr@UGCoyRhTNSbZcr4GZrqUcB3tqdHt@VW3jj4EO/aLQQ16HZDDJ4OvLhLB3O5tx9Miu3qioIZ3wvDN8KQpk2r7kVJKTDtEulR/DX1G8vlVuuTgOcsM7CU3ssgG8cE6gDnO6hxsU/fRzAXRPC1fgyOgrg1sstcBd0OkSINczEJ4y8hPfoEo7CEIkEX1GTECcBxMjHySWaeHV0xvAr6bBDo7hlIkQmMW4a4hGS6I@tmwJl2pC2SL5ED02h6G@dfn8OcKzeszH8YNsWISd0Ga7o9IpNu9noj10crBMF05VjJfaNy0h/YOEBBizMBqofnNM3QpQfuuktb0IDyBgvy/xAOG0Wz7bpKJLS1r/unZ76@AM "Java (OpenJDK 8) – Try It Online")
Since the input can be anything, I decided to take `IntStream`s as input. You can get such an input from a standard `int[]` with `Arrays.stream(array)`.
The output is `1` for "N wins", `-1` for "M wins", and `0` for tie.
### Saves
* -14 bytes from insights of both @Zircon and @Xanderhall!
[Answer]
# Dyalog APL, 14 bytes
```
×(-/(+/÷≢)¨∘⊢)
```
`1` if the left is greater, `¯1` if the right is and `0` on tie.
**How?**
`¨∘⊢` for each list
`+/÷≢` calculate average (`+/` sum `÷` divide by `≢` length)
`-/` subtract the averages
`×` sign of the result
[Answer]
# [Common Lisp](http://www.clisp.org/), ~~74~~ 71 bytes
```
(defun g(x)(/(apply'+ x)(length x)))(defun f(x y)(signum(-(g x)(g y))))
```
[Try it online!](https://tio.run/##lczBCsIwEATQe79ibp1Fimhb/0e0WQNpCDaF5uvjCp7EHty97AyPvQW/pFp5n9waodyER15TCqU9wEKYouaHXSIf47ihCBevcZ3ZUd9MrbKpTE8fMx1ofzNOOKPHgEG@ilFg2@zw8T9@@c3rCw "Common Lisp – Try It Online")
]