SAS specializes in heavy-duty analytics used by companies and government agencies to do everything from detecting credit-card fraud in fractions of a second to determining what sizes and styles of jeans will sell best in various stores across a national retail chain .