Are you sur you don't want a moving windows
(stddev on 0 to 50 , then stdev on 1 to 51)
..
If you don't want moving windows your query would look like
DROP TABLE IF EXISTS your_data;
CREATE TABLE your_data AS
SELECT s as gid , random() as your_data_value
FROM generate_series(1,10000) as s ;
SELECT min(gid) as min_gid, max(gid) as max_gid, stddev(your_data_value) as your_stddev
FROM your_data
GROUP BY (gid-1)/50
ORDER BY min_gid ASC
Please note that "min(gid) as min_gid, max(gid) as max_gid" and "ORDER BY min_gid ASC" are just there to help you understand the result
Cheers,
Rémi-C