There are already lots of questions on this subject like 


[Is there an introduction to probability theory from a structuralist/categorical perspective?](https://mathoverflow.net/questions/20740/is-there-an-introduction-to-probability-theory-from-a-structuralist-categorical)


[Is there a combinatorial/topological treatment of statistical independence?](https://mathoverflow.net/questions/263099/is-there-a-combinatorial-topological-treatment-of-statistical-independence?rq=1)


[What is the algebraic equivalent of independent elements?](https://mathoverflow.net/questions/256823/what-is-the-algebraic-equivalent-of-independent-elements?noredirect=1&lq=1)


and related field called ergodic theory which in fact study different things.


However, as a new category theorist with almost no statistics background I don't aim to learn these advanced topics, but to understand very basic notions like random variable and expectation from a algebraic perspective.


For example, we can define a type family 



> 
> Rand: Type->Type
> 
> 
> 


, and a real random variable can be defined as 



> 
> randnum : Rand Real
> 
> 
> 


and Expectation as



> 
> E : Rand a -> Real
> 
> 
> 


It seems that statistics is the one of the most recalcitrant subject for algebraic approach, but I think it is not the case, we can just treat it as any other abstract object, and define axioms on this abstract random type. The notations and formulas in every introduction book of statistics I have read soon become utterly ugly due to lack of a proper foundation, which is really painful for someone ingrained with abstract algebra and functional programming. However,statistics is extremely useful for machine learning and the modelling of human brain and many others.


I have created a repo for a basic type-directed understanding of statistics in haskell <https://github.com/doofin/alg-statistics>



Good introduction to statistics from a algebraic point of view?
Lucien Le Cam developed an approach to statistics that largely disposes of measure-theoretic probability and replaced probability measures and random variables with certain Banach lattices. The approach can be found in Le Cam's book [Asymptotic Methods in Statistical Decision Theory](http://www.springer.com/de/book/9780387963075) and the more accessible [Comparison of Statistical Experiments](https://www.cambridge.org/core/books/comparison-of-statistical-experiments/405F64D2A2FB3A4E6A1893C1C8A4A60B) by Torgersen.


Keeping the traditional measure theoretic approach to statistics but studying it by a category-theoretic approach is [Statistical Decision Rules and Optimal Inference](https://rads.stackoverflow.com/amzn/click/0821813471) by Cencov.


For basic material on linear regression, there is also [The Coordinate-Free Approach to Linear Models](https://www.cambridge.org/core/books/the-coordinate-free-approach-to-linear-models/7FCB9D477143D2DED8D3AAC4CD1184A8) by Wichura; this is an area amenable to an approach that is likely to be more comfortable for an algebraist. This is the only book in the list that might be said to be introductory.


That being said, anyone who actually wants to work in statistics needs to be familiar with the standard literature and approach. Warts and all. Much of statistical theory is about inequalities; more analysis than algebra. 


