Social Network Analysis: Statistical Model, Community Detection And Friend Recommendation