Given two functions $$f,g:I\rightarrow \mathbb {R}$$
f
,
g
:
I
→
R
and a probability measure $$\mu $$
μ
on the Borel subsets of [0, 1], the two-variable mean $$M_{f,g;\mu }:I^2\rightarrow I$$
M
f
,
g
;
μ
:
I
2
→
I
is defined by $$\begin{aligned} M_{f,g;\mu }(x,y) :=\bigg (\frac{f}{g}\bigg )^{-1}\left( \frac{\int _0^1 f\big (tx+(1-t)y\big )d\mu (t)}{\int _0^1 g\big (tx+(1-t)y\big )d\mu (t)}\right) \quad (x,y\in I). \end{aligned}$$
M
f
,
g
;
μ
(
x
,
y
)
:
=
(
f
g
)
-
1
∫
0
1
f
(
t
x
+
(
1
-
t
)
y
)
d
μ
(
t
)
∫
0
1
g
(
t
x
+
(
1
-
t
)
y
)
d
μ
(
t
)
(
x
,
y
∈
I
)
.
This class of means includes quasiarithmetic as well as Cauchy and Bajraktarević means. The aim of this paper is, for a fixed probability measure $$\mu $$
μ
, to study their equality problem, i.e., to characterize those pairs of functions (f, g) and (F, G) for which $$\begin{aligned} M_{f,g;\mu }(x,y)=M_{F,G;\mu }(x,y) \quad (x,y\in I) \end{aligned}$$
M
f
,
g
;
μ
(
x
,
y
)
=
M
F
,
G
;
μ
(
x
,
y
)
(
x
,
y
∈
I
)
holds. Under at most sixth-order differentiability assumptions for the unknown functions f, g and F, G, we obtain several necessary conditions in terms of ordinary differential equations for the solutions of the above equation. For two particular measures, a complete description is obtained. These latter results offer eight equivalent conditions for the equality of Bajraktarević means and of Cauchy means.