What is the difference (if any) between the following:
This fact (A) is inferred from that fact (B).
This fact (A) is inferred by that fact (B).
Any other preposition that could be used in the above sentence?
The verb to infer is often confounded with to entail. That is understandable, because they are close in meaning: they concern the same logical relationship. They are, however, not interchangeable, because their meaning is not quite the same, and because they are syntactically quite different. The second example in this question is an attempt to treat to infer as if it had the syntactical features of to entail.
To understand why this is a mistake, consider first:
B entails A.
This tells us that B, the premise, as a matter of logic leads to A, the conclusion. If that is true, it is true regardless of whether anyone has ever thought about it. But if it is true, then it is possible that somebody will, at some time, think about it. When a particular person comes to appreciate that B entails A, we can say:
So-and-so has inferred A from B.
While to entail is about the logical relationship itself, to infer is about something that takes place in the ‘head’ of a particular person. The syntax of to infer requires as the subject some term that stands for that person, unlike to entail, which takes as the subject a term for the premise.
When we want to use to entail in the passive voice, we say something like:
A is entailed by B
(where, as before, A is the conclusion, and B the premise). When we transform the above example involving to infer into the passive, we get:
A has been inferred from B, by so-and-so.
Note that the preposition from here introduces the premise, just like it does in the active voice, while by introduces the term for the person who performed the inference. The preposition by does not introduce the same item in the passive sentence with to infer as it does in the passive sentence with to entail because these two verbs do not take the same items as subjects when used in the active voice.
The passive voice, of course, makes it possible to entirely omit any explicit reference to the person doing the action and still use to infer. One can thus say:
A has been inferred from B,
A is inferred from B,
A can be inferred from B.
The last of these is interchangeable with ‘A is entailed by B’. It is when one uses to infer in the passive, without referring to a person, that the tendency to confuse it with to entail is particularly strong, which may lead one to the error of saying ‘inferred by B’. To resist this tendency, one should always remember that in the active voice the subject of that verb stands for the person performing the action. If one keeps that in mind, then the right prepositions to use with to infer in the passive will fall into their places: from for the premise, by for the person, if mentioned.
"Inferred by" is a bit strange, but could be used to mean the person who inferred something (in a passive sentence). That is:
He inferred that something was wrong.
It was inferred that something was wrong by him.
These two sentences mean the same thing, just in an active or passive voice. The second sentence is grammatically correct, but very unnatural and awkward.
In terms of the meaning you are aiming for in the sentence, that we can make a logical conclusion based on a fact, we would prefer the preposition "from". You can think of it as information coming to you from the other fact. For example,
I inferred he was angry from his sour expression.