We know it from comments in system procedure's code. Here is what I've found while digging for some undocumented stuff about statistics:
-- I don't like this copy&paste stuff, but here it boosts performance by 50%
You can find it too - in sys.sp_table_statistics2_rowset procedure. It returns first 2 parts of DBCC SHOW_STATISTICS result (stat header and density vector) in table format. The procedure header is:
EXEC sys.sp_table_statistics2_rowset
@table_name = ?, -- sysname
@table_schema = ?, -- sysname
@table_catalog = ?, -- sysname
@stat_name = ?, -- sysname
@stat_schema = ?, -- sysname
@stat_catalog = ? -- sysname
If you supply only @table_name and @stat_name, you'll receive the same output as from undocumented (I think) syntax of DBCC SHOW_STATISTICS:
DBCC SHOW_STATISTICS(@table_name, @stat_name) WITH STAT_HEADER JOIN DENSITY_VECTOR