The pension coverage of the Iranian Social Security Organization for self-employed workers is offered at three contribution rates of 12, 14 and 18 percent, but looking at the statistics shows that the demand for these types of insurances is low. This research investigates the characteristics of these insured groups by using data mining and applying two machine learning algorithms, decision tree and random forest, and predicts their behavior by providing a classification model. This will help the Social Security Organization to improve customer relationship management. For this purpose, the information of 1286174 insured persons of self-employed in 2020 was used, which includes the characteristics of age, gender, average monthly income, the years of service, and the type of self-employed pension scheme. The obtained results show that women mainly apply for the scheme with 12 percent contribution, while men tend to be covered by schemes with contribution rates of 14 and 18 percent due to the burden of supporting the family. Also, for men, the demand for schemes of 14 and 18 percent increases with the increase of age, income and years of service, but there are no such trends for women. According to the obtained results, years of service and then gender are decisive in choosing the type of pension scheme in such a way that according to the prediction of the model, people with less than 4.5 years of service are known as definite applicants for 12 percent self-employed pension scheme.