This paper introduces a new socio-inspired algorithm referred to as expectation algorithm (ExA), which is mainly inspired from the society individuals. The ExA modeled the variables of the problems as individuals of a society. The variables select their values by expecting the values of the other variables minimizing the objective function. The performance of the algorithm is validated by solving 50 unconstrained test problems with dimensions up to 30. The solutions were compared with several recent algorithms such as Covariance Matrix Adaptation Evolution Strategy, Artificial Bee Colony, Comprehensive Learning Particle Swarm Optimization, Self-adaptive Differential Evolution Algorithm, Backtracking Search Optimization Algorithm, Ideology Algorithm and Multi-Cohort Intelligence algorithm. The Wilcoxon signed rank test was carried out for the statistical analysis and verification of the performance. The results from this study highlighted that the ExA outperformed most of the other algorithms in terms of function evaluations and computational time. The prominent features of the ExA algorithm along with the limitations are discussed as well.