The paper proposes a method to choose the optimal position and capacity for the distributed generation connected to the distribution networks based on the times of reverse power flow, voltage quality and network loss. This method employs sequential Monte-Carlo simulation to deal with the randomness characteristics of photovoltaic and wind power output; the loads of the distribution networks are weighted according to the operation characteristics of the power distribution networks. With the most improvements of the voltage, the least times of the reverse power flow and the least network loss as the target functions and the node voltage, the active and reactive power as the constraint conditions, it applies Newton Method to calculate the power flow of the distribution network to get the optimal position and capacity. Combined with the actual distribution networks, the simulation results proved the practicability and effectiveness of the proposed method.