Letter to Hugo Boxel (Oct. 1674) The Chief Works of Benedict de Spinoza https://books.google.com/books?id=Nz1kRKDMbUMC (1891) Tr. R. H. M. Elwes, Vol. 2, Letter 58 (54).
Contesto: This impels me, before going into your reasons, to set forth briefly my opinion on the question, whether the world was made by chance. But I answer, that as it is clear that chance and necessity are two contraries, so is it also clear, that he, who asserts the world to be a necessary effect of the divine nature, must utterly deny that the world has been made by chance; whereas, he who affirms that God need not have made the world, confirms, though in different language, the doctrine that it has been made by chance; inasmuch as he maintains that it proceeds from a wish, which might never have been formed. However, as this opinion and theory is on the face of it absurd, it is commonly very unanimously admitted, that God's will is eternal, and has never been indifferent; hence... the world is a necessary effect of the divine nature. Let them call it will, understanding, or any name they like, they come at last to the same conclusion, that under different names they are expressing one and the same thing. If you ask them, whether the divine will does not differ from the human, they answer, that the former has nothing in common with the latter except its name; especially as they generally admit that God's will, understanding, intellect, essence, and nature are all identical; so I... lest I... confound the divine nature with the human, do not assign to God human attributes, such as will, understanding, attention, hearing, &c. I therefore say, as I have said already, that the world is a necessary effect of the divine nature, and that it has not been made by chance. I think this is enough to persuade you, that the opinion of those (if such there be) who say that the world has been made by chance, is entirely contrary to mine; and relying on this hypothesis, I proceed to examine those reasons which lead you to infer the existence of all kinds of ghosts.<!--pp. 381-382