This seems better:
julia> @chain dfYX begin
innerjoin(dfZY; on=:y)
groupby([:z,:x])
combine([:probYX, :probZY] => ((yx,zy)->sum(yx.*zy)) => :probZX)
end
4×3 DataFrame
Row │ z x probZX
│ Int64 Int64 Float64
─────┼───────────────────────
1 │ 1 1 0.43
2 │ 1 2 0.31
3 │ 2 1 0.57
4 │ 2 2 0.69