In the present study, Local outlier factor (LOF), the most popular and widely used density-based algorithm for outlier detection, is improved using a new idea. In the proposed idea, a random point in the neighborhood of all objects is used. This method improved the efficiency of the LOF algorithm to an acceptable level. Moreover, the results of the improved LOF indicated the competitiveness of the new algorithm in some real datasets. The comparisons are done based on two criteria: precision and AUC (Area Under the ROC Curve).