The recognition of pathogens relies on the diversity of immune receptor proteins. Recent experiments that sequence entire immune cell repertoires provide a new opportunity for quantitative insight into naturally occurring diversity and how it is generated. I will show how applying statistical inference to these recent experiments that sequence entire B and T-cell repertoires we can quantify the origins of diversity in these sequences and identify functional outliers as well as describe the somatic evolution of the repertoire.