Is Longevity for bowlers and batsmen the same? Seems odd that Cowie would get an 8.5 for 9 tests (3 in 1937 and the rest from 45-49) while Headley gets less than that
Other than the way it modifies them for bowling less than 20% of overs or batting in the tail, yeah it works the same way.
It's an interesting comparison though, and basically borne of a quirk in what happens when an entire team plays no Tests in a year.
Looking at Cowie:
First it calculates the percentage of games for NZ he played between the first and last calendar year he played - so that's from 1937 to 1949 - and he in fact played all of them (100%). On spec this would give him a longevity of 12, but as there were calendar years NZ played no Tests in it at all through that period, it goes through a bit of a different process, dealing with it somewhat year by year/
In 1937 New Zealand played 3 Tests, and Cowie played in all of them, so he gets 1 year's worth of longevity of that year - running total 1.
In 1938 New Zealand played no Tests. As Cowie played both before and after this calendar year he gets some credit for it, but only half his overall percentage (calculated at the start) - 0.5 * 100% which is 0.5 - running total 1.5
In 1939 same deal, another 0.5 - running total 2
In 1940 same again - running total 2.5
In 1941 same again - running total 3
In 1942 same again - running total 3.5
In 1943 same again - running total 4
In 1944 same again - running total 4.5
In 1945 same again - running total 5
In 1946 they played one Test, and he played in it, which is obviously 100% of the games. He gets a full point here - running total 6
In 1947 they played another Test, again he played, running total 7
In 1948 they didn't play, so again he gets half his overall percentage, which is half - running total 7.5
In 1949 they played 4 Tests and he played all of them, he gets another 1 full point - running total 8.5
Headley is a different case because in the calendar years he played, he only actually played 44.9% of West Indies of Tests. As such, in the years they didn't play any during his career, he was only getting half of
that (0.2245) rather than half a full allotment, as it expects he would've played less than the full amount of Tests even if the West Indies were playing on. So his running total is as follows:
1930 - played 5 of 5, +1, running total 1
1931 - played 4 of 4, +1, running total 2
1932 - played 0 of 0, +0.22, running total 2.22
1933 - played 3 of 3, +1, running total 3.22
1934 - played 0 of 0, +0.22, running total 3.45
1935 - played 4 of 4, +1, running total 4.45
1936 - played 0 of 0, +0.22, running total 4.67
1937 - played 0 of 0, +0.22, running total 4.90
1938 - played 0 of 0, +0.22, running total 5.12
1939 - played 3 of 3, +1, running total 6.12
1940 - played 0 of 0, +0.22, running total 6.35
1941 - played 0 of 0, +0.22, running total 6.57
1942 - played 0 of 0, +0.22, running total 6.80
1943 - played 0 of 0, +0.22, running total 7.02
1944 - played 0 of 0, +0.22, running total 7.24
1945 - played 0 of 0, +0.22, running total 7.47
1946 - played 0 of 0, +0.22, running total 7.69
1947 - played 0 of 0, +0.22, running total 7.92
1948 - played 2 of 7, +(2/7), running total 8.20
1949 - played 0 of 2, +0, running total 8.20
1950 - played 0 of 4, +0, running total 8.20
1951 - played 0 of 4, +0, running total 8.20
1952 - played 0 of 3, +0, running total 8.20
1953 - played 0 of 5, +0, running total 8.20
1954 - played 1 of 5, +0.2, running total 8.40
Headley is probably the hardest and weirdest case in that coming back in 1954 might've actually cost him longevity (or gained him next to none - either way) in that then expected him to have played so much less in 40-47 when his team wasn't playing any games at all. It's just a really hard one to deal with without carving out a really special case for it, but ultimately the reason Cowie has greater longevity is that it's 'guessing' he would've played more in the years NZ weren't playing than it's 'guessing' Headley would've when WI weren't.