Statistics for Chemically deposited thin films and their application in solar cells