Econometric analysis of consumers’ preference heterogeneity for yoghurt and ice cream products in Tanzania: A latent class model and mixed logit model Authors: Michael L. Kadigi, Damas Philip, Gilead I. Mlay, Ntengua S. Mdoe Published: 2024 ABSTRACT In Tanzania, a growing upper and middle classes, particularly among urbanites, exhibit distinct preferences for higher-quality processed foods, including dairy products. This study examines variations in consumer preferences and their willingness to pay for yogurt and ice cream, which serve as stand-ins for processed milk products. The analysis is based on a discrete choice experiment involving 400 participants in Dar es Salaam. A random parameter logit model was utilized to account for preference heterogeneity, while latent class models (LCMs) were applied to uncover the underlying factors driving these differences in preferences. Our findings reveal three distinct consumer classes: processed milk sceptics (who prefer unprocessed dairy products), processed milk advocates (who prefer processed products), and neutral consumers (indifferent between processed and unprocessed milk). Preferences are influenced by product attributes, socioeconomic characteristics, and attitudes towards processed foods. The results indicate that Tanzanian consumers place the greatest value on sensory attributes, packaging, and the product's origin (local versus imported). This research offers fresh perspectives on the intricate preferences of dairy consumers in Tanzania, a topic that has been relatively underexplored. The findings suggest that producers and marketers must adapt to the dynamic market by balancing intrinsic and extrinsic factors against price. Understanding consumers' socioeconomic and product attributes is essential for increasing market share and effectively segmenting markets. These findings would be useful incorporated into strategic planning to enhance the competitiveness and sustainability of Tanzania's dairy industry. Introduction Food preferences in developing countries and the world as a whole are ever-changing patterns, especially in the consumption of dietary products. Parallel to these shifts in the context of many African countries, there is a notable occurring in Tanzania's system for promoting food motivated by income growth, urbanization, increasing purchasing power, globalization, and trade liberalization ([[1], [2], [3], [4], [5], [6], [7], [8], [9]] These developments have led to an increase in affluent consumers who demand food products distinctly differentiated by factors such as branding, packaging, detailed labeling, and various quality standards to cater to their diverse needs and preferences ([[10], [11], [12], [13]]). Furthermore, as they become more informed, consumers tend to be more concerned about health and wellness issues associated with nutrition and food quality ([14]). Any changes in these factors are likely to influence the dietary preferences of Tanzanians (especially urbanites) leading to the emerging complex high- and middle-class individuals with diverse interests in and preferences toward processed final products. Notwithstanding the reported changes in dairy demands, milk consumption in Tanzania has historically been low but has been increasing due to economic development and urbanization, reaching 62 L per capita in 2023 ([15]). This is still below the consumption levels in neighbouring East African countries, such as Kenya, where consumption is nearly 120 L per capita due to having more developed dairy industries and higher incomes ([16,17]), and Uganda, which stands at 63 L per capita ([18,19]). In contrast, West African countries such as Nigeria report even lower rates, averaging 20–30 L per capita annually, reflecting disparities in economic development and dietary habits ([20]). Fig. 1 shows the variation of milk per capita consumption excluding butter in kilogram (excluding butter), for Tanzania and other selected African countries based on data compiled by the Food and Agriculture Organization ([17]). Despite this demand based on milk products, particularly in urban areas across Africa, consumption remains well below the WHO's recommended rate of 200 L per capita per year. This leads to nutritional deficiencies in calcium and protein, which are vital for child development and overall health ([17,21]). This trend highlights the ongoing economic shifts, however, achieving the recommended levels remains a challenge.Fig. 1Milk consumption per capita, excluding butter (kg/year/capita).Note: The data reflects per capita food supply available to consumers but does not factor in food waste generated at the consumer level.Fig. 1Data source: [17]. Milk consumption per capita, excluding butter (kg/year/capita). Note: The data reflects per capita food supply available to consumers but does not factor in food waste generated at the consumer level. Regarding food consumption and dairy in particular, Tanzania has witnessed a marked increase attributed to urbanization and an increase in income thereby leading to a consistence increase in food expenditure notably dairy products. Engel's law suggests that low-income households dedicate a substantial share of their income to food, as it provides the highest utility for them. However, as household income grows, the proportion of income spent on food declines. Since the demand for most food products is inelastic, households that reach a saturation point in food consumption often redirect their spending towards non-food goods or prioritize savings [[22], [23], [24]]. In Tanzania, food expenses make up a significant portion of household spending, accounting for 59.9 % of the total. There is also a noticeable disparity between urban and rural areas, with urban households allocating 63.2 % of their expenditure to food, compared to 55.2 % in rural areas ([24,25]). Relatively to other regions in the country Dar es Salam has the highest dairy consumption expenditure, indicating that the Engel coefficient of Dar es Salaam households is higher. This in turn has also fueled the demand for quality dairy attributes. As noted earlier, Tanzania consumers as is the case with consumers elsewhere are becoming very demanding on attributes of milk products, especially quality aspects, and prefer better quality milk products most vis-à-vis other attributes. The trends of food consumption in urban Tanzania seem to be changing as is the case with other developing African economies—mainly Kenya, South Africa, and other SSA countries ([26,27]). Additionally imported foods are more extensively traded in Tanzanian cities, particularly in big cities such as Dar es Salaam. Thus, it is anticipated that in the future, their share of the budget will rise significantly ([26,28]). Dar es Salaam possesses the fast-growing food Tanzanian market ([29]). As the population grows and the economy expands, the demand for foods and marketing for processed foods such as dairy products is likely to rise markedly. Thus, the dairy milk products consumption of in Dar es Salaam is no exception to this trend of evolving preferences and consumption patterns. It is anticipated that the nation's total milk consumption will rise by 50 % by 2030, followed by an additional 16 % by 2050 ([30]). Tanzania's average annual per capita milk consumption is predicted to rise from its current 62 L to at least 100 L, the level reached by the nation with the greatest milk consumption ([15]). This demand growth is an increased public awareness that milk and dairy products provide several health benefits and can offer important vitamins and nutrients ([[31], [32], [33]]). These suggest that members of different food chains should implement coping mechanisms to deal with the ongoing complex transformation in customer preferences and behaviours which in turn influence related changes in the manufacturing, packaging, and promotion of dairy goods. Food marketing studies ([[34], [35], [36], [37], [38], [39], [40], [41], [42], [43]]) furnish good evidence that the demands of milk consumers for product features especially quality have increased. Consumers prefer better quality milk products the most of all other attributes. This implies that dairy marketers must examine and integrate the principles and methods of consumer conduct if they are to succeed and increase their market shares. With the fast-evolving world of consumerism, every processor must research the preferences of their clientele for dairy products to determine the essential characteristics and variables influencing their choices. They must also provide suggestions to businesses on how to enter the appropriate markets to become leaders in the dairy products sector ([41,42,44,45]). Following this, there is an increasing research interest in dairy products and other processed foods, particularly in the developing world. Given this interest, several researchers have looked at consumer preferences and willingness to pay (WTP) for dairy foods ([38,40,[46], [47], [48], [49], [50], [51], [52], [53], [54]]). Research in Tanzania has predominantly focused on examining demand trends and dairy product consumption, with a particular emphasis on the impact of search and sensory attributes like price, taste, and availability ([37,[55], [56], [57]]). For example [56], explored consumer preferences and attitudes toward dairy and beef products in East Africa. [55] compared dairy product consumption patterns in Dar es Salaam and Mombasa, while [36] evaluated how consumers in the ECA region perceived and valued the safety and quality of value-added dairy products. Although these studies provide valuable insights, food-related decisions seem to be influenced not only by product attributes but also by sociodemographic characteristics, psychological factors (such as perceptions and attitudes), and marketing elements ([40,42,[58], [59], [60]]). Additionally, factors within a consumer's social and physical environment, such as information availability, can impact consumer behaviour ([58]). Therefore, research into food choices and consumption behaviour would significantly benefit from considering these factors. However, there has not yet been a comprehensive study on how this broad range of factors affects consumer behaviour regarding dairy products such as yogurt and ice cream in Tanzania. This study aims to fill this gap by providing a thorough empirical analysis of the relative importance of these factors in shaping both the choice, WTP, and consumption patterns of yogurt and ice cream, through the segmentation of consumers into distinct homogeneous groups. This study makes three significant contributions within its context. First, it provides valuable insights for economic stakeholders, such as processors and marketers, regarding consumer behaviours and attitudes toward dairy products, their preferences, and the importance of various quality attributes. This knowledge will assist stakeholders, including yogurt and ice cream manufacturers and marketers, in designing products and strategies that align with consumer expectations and needs. From a policy perspective, the findings offer critical guidance for government investments in the dairy sector. Moreover, understanding consumer preferences and their diversity will support the formulation of effective market strategies, such as targeting specific consumer segments to increase market share. Second, the study contributes to the empirical literature on consumer behaviour within food systems, particularly in developing countries and emerging markets. Third, methodologically, it provides behavioural insights into consumer decision-making by employing a Discrete Choice Experiment (DCE), grounded in economic demand theory ([61]). It further applies random parameter (mixed) logit and latent class models to account for preference heterogeneity and identify its underlying sources using attitudinal variables. To achieve its objectives, this study tested the following three hypotheses.Image 1 Review of empirical literature Theoretical review Lancastrian utility theory Lancaster's theory of consumer demand posits that utility is derived from the attributes of goods rather than the goods themselves [62]. Recent research has expanded on this concept by investigating how specific food product attributes, such as organic labeling, fat content, and flavor variety, shape consumer preferences. For instance Ref. [49], applied Lancaster's framework to assess how consumers value different health-related attributes in yoghurt, revealing significant heterogeneity in preferences. Some consumers may prioritize high protein content in yoghurt for its health benefits, while others might focus on taste or price. This leads to varying WTP for yoghurt products with different attributes, as evidenced by recent empirical studies [49]. Random utility theory (RUT) The Random Utility Theory (RUT), which underpins Discrete Choice Models (DCMs), asserts that a consumer's utility from a product is derived from both observable and unobservable factors is composed of both observable components (e.g., product attributes) and unobservable components (e.g., individual-specific tastes) [63] Recent research by Ref. [64] utilized RUT to analyze consumer preferences for processed dairy products, finding that unobserved heterogeneity plays a crucial role in determining WTP. When choosing between different brands of dairy products, one consumer might prioritize ingredient labeling, product safety certification, and packaging, while another might have a personal bias toward a specific brand due to an experience (an unobservable factor), as illustrated in the work of [64]. Additionally [65], demonstrates that customer preference heterogeneity for avocados is influenced by factors such as taste, consistency (ready-to-eat), and price affordability. Discrete choice models (DCMs) Discrete Choice Models (DCMs), including the multinomial logit (MNL) and mixed logit model (MLM), are essential for modeling consumer choice behaviour within the random utility framework (RUT) [66]. These models allow for the estimation of willingness to pay (WTP) by analyzing how various product attributes influence consumer decisions while accounting for preference heterogeneity. For instance Ref. [52], used MLM to estimate the likelihood of consumers choosing sustainably produced UHT pasteurized milk over conventional milk and to assess their willingness to pay for it. The results showed that consumers generally place a higher value on sustainably produced milk, expressing a willingness to pay a premium over conventional milk, with notable preference heterogeneity. Similarly [59], employed MLM and Latent Class Models (LCM) to explore preferences for imported milk, revealing significant heterogeneity driven by factors like flavor, nutrition claims, fat content, and country of origin. Among these, flavor emerged as the most important attribute, followed by the others in order of significance. In a study on consumer preferences in the Chinese milk market [59], employed a latent class model to categorize consumers into four distinct groups: price-conscious individuals who prioritize green certifications, balanced decision-makers who value traceability labels, health-focused consumers with strong brand loyalty, and environmentally aware buyers who prefer organic certification and view price as an indicator of quality. These preferences are influenced by factors such as sensitivity to price, concerns about food safety, health awareness, and environmental consciousness. Utilizing the DCMs [67], found that consumers are willing to pay a premium for yogurt products with health claims, such as probiotics and reduced sugar, reflecting the importance of perceived utility. Moreover [65], studied avocados applying LCM combined with best–worst choice modeling and found that consumers are willing to pay more for tasty fruits, consistency (ready to eat), and affordable prices indicating that derived utility attitudes strongly influence WTP. The integration of Lancastrian utility theory, random utility theory, and discrete choice models provides a robust framework for analysing consumer preference heterogeneity and WTP, particularly in the context of dairy products such as yoghurt and ice cream. This approach helps to understand how different consumers perceive product attributes and what drives their purchasing decisions, leading to more targeted marketing and product development strategies. Elements impacting consumer preferences and heterogeneity Numerous empirical studies (For example [49,[68], [69], [70], [71], [72], [73]]) have highlighted the attention researchers have given to consumers' preferences, preference variations, choices, and purchasing behaviours regarding food in general and dairy products in particular (i.e., milk, yoghurt, butter, and cheese). Nonetheless, the dairy and milk industries only use the Discrete Choice Experiment (DCE) sparingly. Little research has been found in the literature review that specifically addresses milk and the preferences of milk consumers (e.g. Refs. [38,50,[74], [75], [76]],). Most of these studies were carried out in developed countries, which are the largest producers, and some of these studies were carried out in the least developed countries. Interestingly, there is scant research using DCE in the dairy industry in Tanzania. There is a dearth of literature in Tanzania focusing on the preferences of customers for milk products such as yoghurt milk. Several previous studies have focused on milk and its derivatives. For example [37], investigated milk and found both extrinsic and internal factors that influenced buyer decisions. These factors include availability, taste/flavour, pricing, packaging, and product form. The influence of consumer income and awareness/education on milk consumption was also highlighted by Ref. [37] Furthermore, a study by Ref. [36] shows that among other quality qualities for milk products, Tanzanian niche markets require good hygiene standards, freshness, appropriate packaging, taste, absence of adulteration in milk, adequate pasteurization, and pleasant aroma. As was previously established, most DCE and empirical studies on consumer preferences for milk and milk products have been carried out in industrialised nations; very few have been carried out in developing nations. Empirical literature revealed numerous characteristics (intrinsic and extrinsic), psychographics, and socioeconomic factors that as been associated with influencing customers' preferences and WTP for milk products and other food goods in general. Sensory qualities are the most frequently mentioned drivers of customer preference ([77,78]), this is followed by brand and trust ([56,79]), price ([34,47,80]), packaging and wrapping ([34,36,48]). Comparably, most studies show that consumer attitudes towards attributes of dairy products, such as nutritional contents ([1,34,[81], [82], [83]]); product safety and hygiene ([13,34,84]); and milk product quality, influence consumer preferences and WTP for milk and milk products ([84,85]). Previous studies ([[86], [87], [88], [89]]) have shown that national brands and the country of origin (COO) can have a distinct impact on consumer preferences. Information about the COO can also play a crucial role in shaping customer preferences and effective demand. The term “country of origin” refers to the nation where a product is produced, manufactured, grown, or raised. As noted by Ref. [32], COO branding incorporates various social, political, technological, and economic factors related to a particular country, influencing the product's image. These cues, in turn, affect customers' willingness to pay (WTP), as they are part of the overall value consumers attach to a product. The nation of origin is typically regarded as a natural indicator of the calibre and attributes of agricultural goods ([[90], [91], [92]]). Consumers can identify products and evaluate their quality by using information about their geographic origin ([38,92,93]). Accordingly, researchers looked at food import and local preferences in the US, Germany, South Korea, Finland, Italy, Japan, and other countries. According to their findings, consumers in industrialised nations favour food that is produced domestically over imported brands ([59,94]). According to Refs. [92,95,96] in contrast to consumers in the developing world, consumers of foods imported from developed nations are preferred by less developed nations. [97,98] discovered that Chinese customers favour infant formula made in the US, the EU, and New Zealand over infant formula made locally. Because China has unique national characteristics and frequent food safety incidents, its consumers prefer imported goods over domestic products. This preference for imported foods differs from that of consumers in developed countries. [73] adds, however, that customers do not see or evaluate the norms of quality uniformly even across all products originating from the same nation. In addition to the attributes of milk products, research has shown that socioeconomic and demographic factors such as income and education influence consumer preferences and buying decisions. [99,100] for instance, have demonstrated the highly beneficial impacts of household income and convenience in milk purchasing on milk consumption in households. Similar findings are reported by Ref. [100], who showed that only educational level had an impact on families' likelihood of purchasing milk and their milk expenditure, although the number of children and the elderly had a favourable influence on both. However [100], further found that decisions about a family's milk consumption, purchase decision, and amount of milk spending are significantly impacted negatively by the age of the head of the household and the price of milk. [101] reveal a significant association between milk consumption of dairy products and having or not having children, whereby households with children tend to consume more milk than their counterparts, households with no children. According to the ordinary least square analysis results as reported by [102], families with children under the age of seven, larger households, better-educated household heads, and higher income levels consumed more packaged milk than other types of families. Similar findings indicating the influence of age, education level, and attention on customers were reported by Refs. [102,103]. Literature also shows that socioeconomic and demographic factors are not the only ones that influence people's decisions regarding their dietary choices and preferences. Studies (i.e. [[104], [105], [106], [107]],) show that information from the nutritional, dietetic, and psychological fields have an equal role in influencing consumers' dietary preferences and actions. Regarding milk [108,109], contend that in addition to sociodemographic factors, consumer attitudes, consumption patterns, and purchasing behaviours regarding milk and other milk products also influence consumers' preferences and purchasing behaviour for safer milk. Consumer perceptions towards attributes such as nutritional value, flavour, safety, brand, cost, packaging, size, and country of origin are highly influenced by socioeconomic and demographic variables ([[110], [111], [112]]). The reviewed literature outlines the critical elements that have been demonstrated to control the intake of dairy products, which are frequently linked to positive effects on health and nutrition. Similarly, different discrete approaches have been established from the literature shedding light on the appropriate econometric models for analysing consumer preference heterogeneity and WTP. While we acknowledge that a few available studies in the Tanzanian context provide limited insight on dairy consumer preferences and behaviour, they fail to connect various factors, particularly dairy attributes with socio-economic variables which are presumed to significantly influence consumer preferences and behaviour. Moreover, these studies do not reflect the current state of consumerism of dairy products, which has evolved due to multiple factors, such as technological advancement and innovation in the food industry. It is essential to undertake a study that investigates consumer heterogeneity, identifies market segments, and evaluates consumers' willingness to pay (WTP). By analysing the preferences and drivers influencing Tanzanians' consumption of dairy products, such as yogurt and ice cream, this research seeks to enrich the existing literature on these topics. The subsequent sections outline the research methodology, present the findings, and discuss the conclusions. Material and methods Sample size, study location, and survey methods Before conducting the main fieldwork, a preliminary survey involving 10 participants was conducted to evaluate the most effective survey methodology and assess its clarity and completion time. In March 2019, a pilot survey with 50 participants was carried out in Dar es Salaam, Tanzania. Following [113], who recommend a sample size one to two times larger for choice experiment studies, this research adhered to similar guidelines. The final survey, involving 400 participants, was conducted in Dar es Salaam in June and July 2019. Dar es Salaam, located in the eastern part of Tanzania, is the country's most economically developed region and home to a significant proportion of affluent consumers (see Fig. 2). The sample size calculation for this study used the [114] formula, widely applied in social science research due to its high level of precision. As noted by Ref. [115], the Yamane formula is a reliable method for determining the minimum sample size for a given population. According to Ref. [116], acceptable error margins in social and educational research are generally 3 % for continuous data and 5 % for categorical data. Furthermore [117], highlighted that for dichotomous variables, a 5 % margin of error ensures confidence in the calculation's precision, with the proportion of respondents exhibiting the characteristics of interest falling within ±5 % of the population as estimated by the sample.Fig. 2Map of study areas.Fig. 2 Map of study areas. The total number of samples utilized in this study can be found using the Yamane formula in equation (1):(1)n=N1+N∗(e)2 The sample size is indicated by n. N is the population size. e stands for error margin (permissible error (%)/precision level (0.05)).n=43645411+4364541∗(0.05)2 399.96 is the value of n. About 400 people responded. The total of 400 respondents aligns with [113]'s recommendation for the minimum sample size required for Discrete Choice Experiment (DCE) studies. The sample size was calculated based on the guidelines and methodologies outlined by Ref. [118] for analysing data from choice experiments. Before participating in the survey, each respondent signed a consent form after their sociodemographic characteristics and dairy consumption patterns were reviewed to ensure the sample's representativeness. A tailored “cheap talk” script was presented to remind participants to base their decisions on actual purchasing behaviour rather than hypothetical preferences, considering their budget constraints, to mitigate potential hypothetical bias. The study employed a combination of purposive and systematic random sampling techniques to select participants from the five municipalities of Dar es Salaam. A two-stage sampling approach was used for participant selection. In the first stage, the enumeration areas (EAs) in Dar es Salaam were categorized into three income strata: high, middle, and low-income groups. The sample was further stratified by gender, age, and residential location. In the second stage, eight households were randomly selected from each of the 55 EAs across the three strata, resulting in a proportionate sample size of 440 households. However, some observations were omitted from the study due to issues with the data, such as missing information. Consequently, the study ended up with a working sample size of 400 respondents as established earlier. To ensure the targeted sample size is reached, careful planning and establishment of trust with the target respondents were achieved through informed consent. An informed consent facilitated to building of rapport with respondents and emphasized the importance of the research outcomes that might have been used. Recruitment also involved local community leaders who facilitated trust and legitimacy. On average, the process took 45 min per respondent. Given the nature of the Dar es Salaam city, respondents were either approached early in the morning or late evenings and others during weekends. The rationale for choosing these times was due to the availability of the respondents, as they had jobs, household duties, and other activities that influenced when they were free. Discrete choice experiment (DCE) design The choice experiment (CE) models originate in the marketing and applied decision research literature, and are often found in names of ‘choice experiments’, ‘stated choice analysis’, ‘discrete, stated preference, or ‘conjoint techniques’ [119]). Confronting the respondent is the fundamental premise behind a CE with different hypothetical sets of choice situations, in which he or she must choose the preferred alternative. The CE was put into place by employing a questionnaire to collect data from respondents who regularly consumed dairy products, that is, at least once a month, and milk and milk products. Otherwise, acquiring genuine purchase data would have been more expensive and time-consuming. Furthermore, the revealed preference approach might have been limited in terms of gathering data on respondents' domestic values, purchase patterns, attitudes, and choices, as well as household factors ([38,120]). In this respect, the expressed preference method worked better since it better addressed the goal of the study. In particular, the discrete choice experiment used in this study makes it easier to see how respondents select various attribute combinations. Additionally, it enables the evaluation of distinct attribute trade-offs at various price points, leading to an evaluation of relative attribute values The stated preference approach was employed rather than the revealed choice method for various reasons. This approach involved capturing respondents' hypothetical decisions to purchase yogurt and ice cream based on specific attributes associated with these products. Level settings and attributes A set of attributes, each with specific levels, is used to define the choice scenarios. Before framing the choice sets, a bundle of attributes dictating the choice of dairy products was generated to mirror their actual characteristics. A bundle of these characteristics and the corresponding weights assigned to them in the CE were chosen sequentially. Examining the research on key characteristics of dairy intake was the first step ([37,57,121]) followed by consultations with dairy processors and consumers. The CE of this study comprised four bundles of attributes that defined each choice: flavour, packaging, product provenance (domestic or foreign), as well as purchase cost. The purchase price was chosen to obtain WTP for the product cues. Each characteristic was defined by a distinct set of levels; for example, each of the three attributes (flavour, packaging, and product origin—local vs. imported) had two levels, but the pricing attribute had four levels. The purchase price points considered were based on the market prices of processed dairy products and their conventional alternatives. Each choice set in this study's CE design had four (A, B, C, and D) choices. Processed dairy products were the first two options; ordinary milk, or non-processed milk, was the third option; and the “no purchase” option was the fourth. Table 1 provides details on the final set of qualities used in the choice experiments along with their corresponding levels.Table 1Attributes employed in the choice experiment.Table 1AttributeAttribute levelDescriptionFlavour1Vanilla flovour2Strawberry flavourSensory attribute levels include the taste of dairy for the sake of this study it was operationalized into flavor.Packaging and wrapping1Container-Plastic2Bottles/cup - PlasticDairy item is packaged using materials that preserve the food for safe customer delivery without compromising its nutritional content or qualities. Typical packaging styles seen at supermarkets:Origin products1Local/Domestic2Imported/ForeignWhether the dairy product is produced in Tanzania or is imported from another countryPrice offered (TZS)Retail price of the dairy goods in local currencies. The pricing is between 2000 and 6000/ =Yoghurt12000TZS/500 mL22500TZS/500 mL33000TZS/500 mL43500TZS/500 mLIce cream.12000TZS/500 ml25000TZS/500 mL35500TZS/500 mL46000TZS/500 mLNote: TZS = Tanzania Shillings: Exchange rate: 1TZS = 0.00043 USD. The price included varied depending on the alteration in the rest of the attributes included in the choice experiment. Table 1Attributes employed in the choice experiment.Table 1AttributeAttribute levelDescriptionFlavour1Vanilla flovour2Strawberry flavourSensory attribute levels include the taste of dairy for the sake of this study it was operationalized into flavor.Packaging and wrapping1Container-Plastic2Bottles/cup - PlasticDairy item is packaged using materials that preserve the food for safe customer delivery without compromising its nutritional content or qualities. Typical packaging styles seen at supermarkets:Origin products1Local/Domestic2Imported/ForeignWhether the dairy product is produced in Tanzania or is imported from another countryPrice offered (TZS)Retail price of the dairy goods in local currencies. The pricing is between 2000 and 6000/ =Yoghurt12000TZS/500 mL22500TZS/500 mL33000TZS/500 mL43500TZS/500 mLIce cream.12000TZS/500 ml25000TZS/500 mL35500TZS/500 mL46000TZS/500 mLNote: TZS = Tanzania Shillings: Exchange rate: 1TZS = 0.00043 USD. The price included varied depending on the alteration in the rest of the attributes included in the choice experiment. Attributes employed in the choice experiment. 1Vanilla flovour Vanilla flovour 2Strawberry flavour Strawberry flavour 1Container-Plastic Container-Plastic 2Bottles/cup - Plastic Bottles/cup - Plastic 1Local/Domestic Local/Domestic 2Imported/Foreign Imported/Foreign 12000TZS/500 mL 2000TZS/500 mL 22500TZS/500 mL 2500TZS/500 mL 33000TZS/500 mL 3000TZS/500 mL 43500TZS/500 mL 3500TZS/500 mL 12000TZS/500 ml 2000TZS/500 ml 25000TZS/500 mL 5000TZS/500 mL 35500TZS/500 mL 5500TZS/500 mL 46000TZS/500 mL 6000TZS/500 mL Note: TZS = Tanzania Shillings: Exchange rate: 1TZS = 0.00043 USD. The price included varied depending on the alteration in the rest of the attributes included in the choice experiment. The difference between plastic containers and plastic bottles/cup included in the DCE is based on the shape, structure, and usage: Shape and Structure: Plastic Containers: Typically, plastic containers have a broader, more versatile shape, often rectangular or square, designed for storing solid or semi-solid products. They usually come with lids that can be removed or resealed. Plastic Bottles/Cups: Plastic bottles are usually cylindrical with a narrow neck, suited for liquids. Cups are smaller, round, and open at the top, often sealed with a lid or foil. Usage:Plastic Containers: Commonly used for packaging food items like yogurt, butter, or pre-cooked meals, where a more stable, stackable form is beneficial. Plastic Bottles/Cups: Bottles are primarily used for beverages like milk, yoghurt, juice, or water, while cups are used for single servings of yogurt, pudding, or snacks. It is important that this study's choice set design differs slightly from that of previous choice experimental research. Most prior research has required the selection of only one representative product, with a very simple choice design where the differences between alternatives in each choice set are the treatment combinations. Two items are included in each choice set for this partial constant design to reflect reality: processed dairy goods that look at processed features and traditional milk that is used as the base or reference product. As was previously stated, processed milk products such as yoghurt, ice cream, and cheese only account for a minor portion of the market, with regular milk typically continuing to dominate the market even in the metropolitan areas ([2,57]). Thus, it makes sense to use conventional milk as the foundation or reference product in this experimental design so that participants could weigh the pros and cons of switching between different treatment combinations as well as between conventional and processed milk. In a similar vein, the “no purchase option” was incorporated to mimic the actual retail setting, in which customers are always free to decide not to purchase a thing. In every choice set, the “no-purchase” option is a fixed alternative throughout choice sets. Enforced decisions were avoided by including the no-purchase option in the choice set. Customers are compelled to choose between hypothetical alternatives in a choice experiment if no-purchase option is available. This could affect the attribute values in comparison to a real-world market scenario. Additionally, the product demand estimates and WTP results may be skewed by forced decisions ([122]). Dairy product attributes and choice sets This study incorporated four product attributes for both ice cream and yogurt, with attribute levels of 2/2/2/4, respectively. A full factorial design combining these attributes and levels produced (2 × 2 × 2 × 4) × 2 = 64 (2 \times 2 \times 2 \times 4) \times 2 = 64 (2 × 2 × 2 × 4) × 2 = 64 potential product combinations or choice sets. Presenting all these options to respondents was deemed impractical, as it could lead to cognitive overload and fatigue. To address this, a fractional factorial design (FFD) was utilized to reduce the number of options while minimizing biases, capturing cross-terms, determining manageable choice set numbers, and randomly generating attribute combinations of dairy products ([123,124]). We adapted methods from Ref. [125] and created an orthogonal fractional factorial design with a random block structure, in line with recommendations from Refs. [118,126]. These sources suggest that a reasonable number of choice sets per respondent should range from eight to a maximum of sixteen hypothetical combinations. To reduce the burden on participants and considering additional survey questions, each respondent was presented with a block of eight choice questions drawn from the 64 total sets. The survey instrument included choice scenarios for yogurt and ice cream, with examples illustrated in Fig. 3, Fig. 4. While yogurt and ice cream differ in price attributes and packaging types—yogurt typically in plastic bottles or cups, and ice cream in plastic containers or cups—the number of attributes and their levels were identical for both. This ensured a consistent design across the two product types.Fig. 3An illustration of a yoghurt choice set from the survey.Fig. 3Fig. 4An illustration of an ice cream choice set from the survey.Fig. 4 An illustration of a yoghurt choice set from the survey. An illustration of an ice cream choice set from the survey. Effect coding was chosen over dummy coding to encode the attributes of yogurt and ice cream, as it mitigates the risk of boundary value estimates and prevents overestimating willingness to pay (WTP) ([62,118,[127], [128], [129]]). This approach also allows for the evaluation of non-linear effects in attribute levels while avoiding confounding with the grand mean of the utility function. Effect coding assigns code values that sum to zero for each attribute, as noted by Ref. [118]. In contrast, dummy-variable coding can cause the base level of an attribute to align with the zero-utility of the traditional non-functional food alternative, which acts as the reference level for the utility function's representative component ([74]). This alignment makes it difficult to separately estimate the effects of individual attribute levels. As highlighted by Bechtold and [68], effect coding is therefore the preferred method for its ability to address these challenges and provide more accurate estimates. Theoretical framework and econometric modeling Mixed logit—an empirical method Based on [62]'s demand theory, which asserts that consumers derive utility from a product's attributes rather than the product itself, this study utilized a discrete choice experiment (DCE). In alignment with [63]'s random utility theory (RUT), consumer utility is divided into two components: a deterministic part defined by the product's attributes and a random component influenced by unobserved factors. To estimate the parameters of the random utility model, researchers typically employ either the conditional logit model or the more flexible mixed logit model (MLM). The MLM is particularly advantageous for this study because it relaxes the independence of irrelevant alternatives (IIA) assumption, allowing preference parameters to vary randomly across individuals in the population [66]. This flexibility is crucial for capturing heterogeneous preferences, which are central to the study's framework. In the empirical context of this research, for each t choice scenario (t = 1, 2, …, T), the utility of a consumer n selecting alternative i from a set of j alternatives in the choice set MMM is expressed as shown in Equation (2).(2)Unit=βnXnit+εnit In this context, the vector Xnit represents the influence of consumer preferences on mmm observable attributes of the choice. These attributes include flavour, packaging or wrapping, product origin (country of origin, COO), price, and an alternative-specific constant (ASC) dummy variable that captures the utility associated with opting for the “opt-out” or non-purchasing option); βn is a random coefficient vector that is not observed for every n, that is believed to have a density and a normal distribution f(βn|θ), where θ is the distribution's actual parameter; and εnit is an unobserved error factor that is thought to have an independent, identical distribution. Conditioned on βn In the given choice scenario, the likelihood that customer n will select option i (see equation (3)) is.(3)Prnit=Lnit(βn)=exp(βnXnit)∑j=1Mexp(βnXnjt). As βn is unknown we employ the conditional probability throughout the full range of potential values for the unconditional probability β. The distribution of β determines this range as indicated in equation (4).(4)Prnit(θ)=∫Prnitf(βn|θ)dβn. Next, the likelihood that every customer will make a series of decisions is presented in equation (5),(5)Prn=∏t=1T[∏i=1M(exp(βnXnit∑j=1Mexp(βnXnjt)Ynit].where Ynit denotes an indicator function that, when consumer n chooses the alternative, is equal to 1 I in a situation of choice t, and 0 otherwise. The maximum likelihood estimation that solves for βˆ that maximizes the log‐likelihood function is expressed in equation (6),(6)lnL=∑n=1N∑t=1T∑i=1MYnitln(Prnit),where lnL represents the total of all choice likelihood functions [66] Using 50 Halton drawings, simulated likelihood was used to estimate the models. It is worth noting that a stated preference approach has been employed whereby consumers are directly asked about their preferences through surveys or experiments. Consumers were presented with hypothetical scenarios of product choices and asked to indicate their preferences. The utility was then calculated using econometric models i.e. discrete choice models, where consumers' stated preferences were used to estimate the utility associated with different product attributes. Latent class model Latent class logit models have grown in popularity in the identification of consumer segments with a variety of preferences ([65,80,[130], [131], [132], [133], [134], [135]]). We use this methodology in this research to investigate heterogeneity in convenience preferences and to expound on aspects that could account for probable causes of this heterogeneity. Assuming variation in the associated parameters across these classes, consumers are classified into discrete classes (c = … 1, 2 …, C) within the framework of the latent class logit model. When consumer n is assigned to latent class c, based on the highest expected likelihood of class membership, the probability that they choose alternative i in choice scenario t is represented mathematically in Equation (7).(7)Pr(nit|c)=exp(βcXnit)∑j=1Mexp(βcXnjt,i≠j. The joint probability for a given class assignment, c, is the likelihood that consumer n will make a particular set of selections presented in equation (8),(8)Prn(c)=∏t=1T∏i=1M(exp(βcXnit)∑j=1Mexp(βcXnjt)Ynit,i≠j,where; Ynit is an indicator function that, in the case that consumer n selects option i in choice scenario t, is 1; otherwise, it is 0. Given that class membership status cannot be observed, the likelihood that consumer n will be placed in class c is expressed in equation (9).(9)Prnc(δ)=exp(δcZn)1+∑k=1C−1exp(δkZn),c≠k,where Zn is a collection of traits that consumers can observe n and δ=(δ1,δ2…,δC−1) is a membership parameter vector. To ensure normalcy, we set the membership parameters for one of the classes to zero. Based on the analysis of various information criteria, including the McFadden pseudo R2 (ρ2), log-likelihood (LL), Akaike Information Criterion (AIC), and Bayesian Information Criterion (BIC), as well as the posterior prediction accuracy distribution for each model, sample size, significance, and interpretability of parameter estimates, the optimal number of classes to retain in each regression model was determined ([[136], [137], [138]]). These criteria log-likelihood (LL), Bayesian Information Criterion (BIC), and Akaike's Information Criterion (AIC) are used to evaluate model fit and guide the selection of the most appropriate model by balancing model complexity with goodness of fit. McFadden pseudo R2 (ρ2) has been applied to this research. Minimizing the AIC and BIC results in LL and ρ2 are maximized. Location disparities may also influence preferences for convenience. The log-likelihood function is maximized using maximum likelihood estimation (MLE), which is defined as:(10)lnL=∑n=1Nln(∑c=1CPrnc(δ)Prn(c)) Equation (10) plays a critical role in estimating the parameters of models such as the Mixed Logit Model (MLM) and the Latent Class Model (LCM). In this equation, the log-likelihood lnL is computed by summing the logarithms of the probabilities that each respondent n selects a particular alternative c, given the parameters δ. Maximum Likelihood Estimation (MLE) is then used to identify the parameter values that maximize the log-likelihood function, making the observed data as probable as possible. After estimating the attribute coefficients in the MLM and LCM models, the next step is to calculate the Marginal Willingness to Pay (MWTP) for specific attributes. MWTP is calculated by taking the ratio of the price coefficient to the marginal utility of the attribute, as shown in Equation (11). This allows for an estimation of how much consumers are willing to pay for specific product features, reflecting their preferences for these attributes relative to price.(11)WTPAttribute=−(δU/δXjntδU/δPjnt)=−βattributeβprice This equation determines the amount a respondent is willing to pay for a slight enhancement in an attribute. In this context, δU/δXjnt represents the marginal utility from a change in the attribute Xj , and δU/δPjnt represents the marginal disutility from an increase in price (or cost). Since individual income data may not be available, the marginal utility of income is often approximated by the negative of the disutility from price (as suggested by Refs. [[139], [140], [141]]. The MWTP is then computed as the negative ratio of the attribute's coefficient βattribute to the price coefficient βprice, indicating the trade-off consumers are willing to make between the attribute and price. Where P represents the price and X is a vector of the dairy product's attributes. A class-specific monetary coefficient on price is called βprice, and a class-specific non-monetary coefficient is called βattribute. The 95 % confidence intervals for the WTP estimates were calculated using a parametric bootstrapping approach recommended by Ref. [142]. Specifically, in STATA 17 [142], a multivariate normal distribution was generated based on model-derived coefficients and variances, creating a simulated dataset of 2,000 observations for each WTP estimate. This approach does not assume a symmetrical distribution of WTP but provides results similar to those obtained using the delta method for standard error estimation [129]. Utilizing socioeconomic factors to address the causes of heterogeneity and using attributes to study the sources of variation in consumer preferences, LCM divides consumers into discrete classes (Fig. 5).Fig. 5Thematic framework for latent class model (LCM).Fig. 5 Thematic framework for latent class model (LCM). The rationale for employing LCM and MLM in the analysis The Latent Class Model (LCM) and Mixed Logit Model (MLM) are widely used in analysing heterogeneity of consumer preference and WTP due to their advanced capabilities in capturing individual differences in preferences. LCM is effective in identifying subgroups within the population that share similar preferences, allowing for a nuanced understanding of heterogeneity by assuming distinct preference patterns for each class ([137]). This model simplifies the analysis by grouping individuals into classes, which is particularly useful for market segmentation and identifying consumer segments with varying WTP for specific attributes ([120]). On the other hand, MLM offers flexibility by allowing random variation in preferences across individuals, as it assumes the coefficients of utility functions are drawn from a distribution rather than from being fixed. This flexibility makes MLM particularly powerful in capturing continuous preference heterogeneity, leading to more accurate analyses ([66]). Additionally, MLM is advantageous for estimating WTP because it can incorporate random taste variation, unrestricted substitution patterns, and repeated choices, resulting in more realistic estimates of how much consumers are willing to pay for different product attributes ([66]). These models are preferred in contemporary research due to their ability to provide a richer and more detailed understanding of consumer preferences, which is essential in fields such as marketing, economics, and product development. Results and discussion Socio-economic characteristics of survey participants Table 2 indicates the age, gender, education level, number of children below 12 years, occupation, monthly income, and individual frequency of milk consumption of the surveyed participants. Findings reveal that 66 % of the respondents were between 18 and 35 years old, and 22 % were between 36 and 45 years old. Most survey respondents had completed primary school, and 78 % of them reported having children under 12 years old, suggesting that their propensity to have children also affected how much milk they drank. Most children need milk for growth and nutrition enhancement. Of the surveyed participants, only 19 % held a salaried position, while 79 % were business owners. Additionally, the results show that 44 % of participants had an average monthly income of less than TZS 500,000, and 29 % had an income that fell between TZS 500,000 and TZS 100,000. About the frequency of milk consumption, 25 % of participants reported consuming dairy products twice a week, while 38 % of the participants said they usually consume dairy products.Table 2Socioeconomic characteristics of survey participants.Table 2VariableFrequencyPercentage (%)SexFemale24060Male16040Total400100Age Cohort (overall mean = 36)Age 18 to 3522756.8Age 36 to 458822.0Age 46 to 657619.0Above 6592.3Total400100EducationAbsence of formal education112.8Primarily19047.5Secondary14335.8Diploma and certificate from college215.3University (degree and above)358.8Total400100Household size (Mean = 4)1 to 316942.34 to 617543.87 to 104511.3Above 10112.8Total400100Number of children below 12No5413Yes34687Total400100OccupationBusiness31679Salary employed7619Farming (crop and/or livestock)82Total400100Monthly Income (TZS)Less than Tsh.500,000/ =17744TZS.500,001/ = to TZS.1,000,000/ =11929TZS.1,000,001/ = to TZS.1,500,000/ =4712TZS. 1,500,001/ = to TZS.2,000,000/ =277TZS.2,500,001/ = to TZS.3,000,000/ =195More than TZS.3,000,000/ =113Total400100Milk product consumption frequencyMost often/every day10238Twice a week15325Past 7 days8922Twice a Month349Last Month226Total400100 Table 2Socioeconomic characteristics of survey participants.Table 2VariableFrequencyPercentage (%)SexFemale24060Male16040Total400100Age Cohort (overall mean = 36)Age 18 to 3522756.8Age 36 to 458822.0Age 46 to 657619.0Above 6592.3Total400100EducationAbsence of formal education112.8Primarily19047.5Secondary14335.8Diploma and certificate from college215.3University (degree and above)358.8Total400100Household size (Mean = 4)1 to 316942.34 to 617543.87 to 104511.3Above 10112.8Total400100Number of children below 12No5413Yes34687Total400100OccupationBusiness31679Salary employed7619Farming (crop and/or livestock)82Total400100Monthly Income (TZS)Less than Tsh.500,000/ =17744TZS.500,001/ = to TZS.1,000,000/ =11929TZS.1,000,001/ = to TZS.1,500,000/ =4712TZS. 1,500,001/ = to TZS.2,000,000/ =277TZS.2,500,001/ = to TZS.3,000,000/ =195More than TZS.3,000,000/ =113Total400100Milk product consumption frequencyMost often/every day10238Twice a week15325Past 7 days8922Twice a Month349Last Month226Total400100 Socioeconomic characteristics of survey participants. Econometric analysis: consumer preference heterogeneity analysis Mixed logit model results Considering that the coefficients for the quality attributes of ice cream and yogurt were randomly distributed. To obtain the estimates from the Mixed Logit Model (MLM) and Latent Class Model (LCM), we used STATA 17. The negative and statistically significant price coefficient at the 1 % level for both models indicates that higher prices decrease consumers' utility, consistent with the law of demand (See Table 3). This result aligns with findings from studies by Ref. [59], and [94]. Additionally, the positive and statistically significant coefficients for strawberry and vanilla attributes for both yogurt and ice cream at the 1 % level suggest that consumers prefer flavoured milk products over plain ones, consistent with global consumption trends highlighted in studies by Refs. [55,133,[143], [144], [145]], which show that vanilla and strawberry are the most popular flavors.Table 3Parameter estimates for the MLM for yoghurt and Ice cream.Table 3VariableYoghurtIce creamCoefficient ofStandard Error ofCoefficient ofStandard Error ofMeanVanilla0.101∗∗∗0.2160.163∗∗∗0.188Strawberry0.387∗∗∗0.6430.142∗∗∗0.113Plastic/paper cup pack0.607∗∗0.472−1.220∗∗1.099Plastic bottle pack−0.774∗∗0.3931.263∗∗∗0.135Domestic0.310∗∗0.1860.126∗∗∗0.129Foreign−0.659∗∗∗0.276−0.310∗∗0.186Price−0.001∗∗0.000−0.000∗∗0.000Conventional−1.095∗∗0.599−2.0340.456Altern spec. Const (no-purchase)−20.001∗∗2538.64−17.438∗∗2076.380Standard Deviation0.100∗∗2726.120.100∗∗∗2031.241Number of observations400400LR chi2 (1)0.0000.000Log-likelihood−104.548−89.748Prob > chi20.99900.9989Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. Table 3Parameter estimates for the MLM for yoghurt and Ice cream.Table 3VariableYoghurtIce creamCoefficient ofStandard Error ofCoefficient ofStandard Error ofMeanVanilla0.101∗∗∗0.2160.163∗∗∗0.188Strawberry0.387∗∗∗0.6430.142∗∗∗0.113Plastic/paper cup pack0.607∗∗0.472−1.220∗∗1.099Plastic bottle pack−0.774∗∗0.3931.263∗∗∗0.135Domestic0.310∗∗0.1860.126∗∗∗0.129Foreign−0.659∗∗∗0.276−0.310∗∗0.186Price−0.001∗∗0.000−0.000∗∗0.000Conventional−1.095∗∗0.599−2.0340.456Altern spec. Const (no-purchase)−20.001∗∗2538.64−17.438∗∗2076.380Standard Deviation0.100∗∗2726.120.100∗∗∗2031.241Number of observations400400LR chi2 (1)0.0000.000Log-likelihood−104.548−89.748Prob > chi20.99900.9989Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. Parameter estimates for the MLM for yoghurt and Ice cream. Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. According to the packaging coefficient, the “paper cup pack” for yogurt is statistically significant and positive at the 5 % level, while the “paper cup pack” for ice cream is statistically significant and negative at the same level. This indicates that consumers prefer yogurt packaged in paper cups, whereas packaging ice cream in the same type of container significantly reduces its utility (Table 3). Additionally, the bottle-back packaging design enhances consumer utility when used for ice cream but decreases utility when applied to yogurt. These findings are consistent with previous studies, which have shown that consumers tend to prefer yogurt packaging that is more securely designed ([109,131,146]). It is important to note that the utility or attribute levels presented in this study were modelled based on the observed product attributes as well as unobserved factors, in line with random utility theory. Higher part-worth or attribute-level values suggest that consumers derive greater utility (or preference) from that particular attribute level, while negative part-worth values indicate that consumers experience disutility or dislike that attribute level compared to others. The regression results for yoghurt and ice cream, respectively, show the coefficient for the domestic attribute as positive and statistically significant at the 5 % and 1 % levels, indicating that domestically processed yoghurt and ice cream boost consumers' utility. On the other hand, the foreign (imported) attribute's coefficient for yoghurt and ice cream is negative and statistically significant at the 1 % and 5 % levels, respectively, suggesting that consumption of imported milk products diminishes consumers' utility. (Table 3) Our findings concur with findings in other studies such as [38,147], which revealed that milk consumers in Senegal, Ghana, and Canada indicated a substantial preference for local dairy products over imported ones. The coefficient for the alternative specific constant has a negative and statistically significant sign, indicating that, on average, consumers in our samples find it more convenient to choose yoghurt and ice cream than to forego making a purchase. Since the MLM assumes variation in utility coefficients across individuals based on continuous probability distribution functions, this provided an opportunity of testing the hypothesis of preference heterogeneity in consumer choices. The results indicate that the estimated parameters for the attributes associated with yoghurt and ice cream are all significantly different from zero, suggesting heterogeneity in consumer preferences. This finding permitted us to accept the hypothesis of heterogeneous preferences in the MLM. Table 4 displays the WTP estimates derived from the MLM for various yogurt and ice cream attributes. The WTP values were calculated using point estimates for the MLM [118]. These values represent the additional amount consumers are willing to pay for each unit increase in the corresponding attribute. The WTP estimates indicate that consumers are willing to pay a significant premium for vanilla flavour, with values of 0.625 for yogurt and 0.205 for ice cream. Additionally, strawberry flavour is also highly preferred, with WTP estimates of 0.390 for yogurt and 0.364 for ice cream. This finding is consistent with previous studies (e.g. Refs. [1,59]), which have highlighted that flavour plays a key role in shaping consumers' preferences and WTP for dairy products.Table 4Estimation of willingness to pay (MWTP) for the MLM attributes.Table 4VariableMarginal Willingness to payYoghurtIce creamFlavour Vanilla0.625∗∗∗0.205∗∗Flavour Strawberry0.390∗∗∗0.364∗∗∗Plastic container1.532∗∗−0.934∗Packaging bottle−0.004∗∗∗−0.001∗∗∗Domestic/local0.675∗∗0.379∗∗∗Foreign/imported−0.538∗∗−0.675∗∗Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. Table 4Estimation of willingness to pay (MWTP) for the MLM attributes.Table 4VariableMarginal Willingness to payYoghurtIce creamFlavour Vanilla0.625∗∗∗0.205∗∗Flavour Strawberry0.390∗∗∗0.364∗∗∗Plastic container1.532∗∗−0.934∗Packaging bottle−0.004∗∗∗−0.001∗∗∗Domestic/local0.675∗∗0.379∗∗∗Foreign/imported−0.538∗∗−0.675∗∗Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. Estimation of willingness to pay (MWTP) for the MLM attributes. Note: ∗, ∗∗, and ∗∗∗ showing significant variables at (p < 0.01), (p < 0.05), and (p < 0.001) levels, respectively. The influence of the packaging type is mixed. For yoghurt, a plastic container has a WTP estimate of 1.532; however, for ice cream, it has a negative and substantial impact of −0.934. The impact of packaging in a bottle is minimal for both ice cream and yoghurt. Research on how consumers behave towards packaging has yielded conflicting findings. The findings on benefits of using plastic yoghurt containers are consistent with the findings in a study (e.g. Ref. [148],) showing that customers frequently identify plastic as convenient and fresh. However, the detrimental impact on ice cream might be investigated further considering environmental issues with plastic packaging. Customers have a negative readiness to pay (−0.538) for foreign or imported yoghurt, but they are willing to pay more for yoghurt with a domestic or local origin (0.675). Similarly, customers preferred local or domestic ice cream (−0.675) over imported or international ice cream (−0.538). According to studies on their preferences for imported and local goods (e.g. Refs. [64,147],), consumers frequently identify local products with freshness, trust, and support for the local economy. The results further indicate that all WTP coefficients associated with yoghurt and ice cream are significantly different from zero, permitting us to reject the hypothesis that consumers’ derived utility attitudes do not influence their WTP premium. Results of the latent class model i)Number class and fit estimation i)Number class and fit estimation Number class and fit estimation The latent class model estimation technique is as simple as repeatedly estimating the model for varying numbers of preference classes. The matched number of classes that best fit the data is identified using fit criteria. Models with one to five classes were tested, though the five-class model did not converge for yogurt and ice cream. To find the ideal number of latent classes in each model, the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) were applied [136]. The analyst must determine how many classes are necessary to answer the underlying research questions in an LCM, as well as how simple it is to understand several classes when there are a lot of them ([149,150]). Table 5 displays the combined data for these models.Table 5LCA model showing the criteria for the number of classes.Table 5No of classesLog Likelihood (LL)AICbBICcYoghurta1−150659.23301378.5301598.32−141611.55283345.1283792.13−134299.57268783.1269457.44−134005.8268253.6269640.4Ice creama1−152936.63305933.3306153.12−141682.35283484.7283924.43−138899.38277982.82786574−134704.26278654.5270556Note: For all two dairy products, three latent classes are the ideal number. From a sample size of 400 people, there are 11255 observations for yoghurt and 11256 for ice cream (n). as for yoghurt and ice cream. Table 5LCA model showing the criteria for the number of classes.Table 5No of classesLog Likelihood (LL)AICbBICcYoghurta1−150659.23301378.5301598.32−141611.55283345.1283792.13−134299.57268783.1269457.44−134005.8268253.6269640.4Ice creama1−152936.63305933.3306153.12−141682.35283484.7283924.43−138899.38277982.82786574−134704.26278654.5270556Note: For all two dairy products, three latent classes are the ideal number. From a sample size of 400 people, there are 11255 observations for yoghurt and 11256 for ice cream (n). as for yoghurt and ice cream. LCA model showing the criteria for the number of classes. Note: For all two dairy products, three latent classes are the ideal number. From a sample size of 400 people, there are 11255 observations for yoghurt and 11256 for ice cream (n). as for yoghurt and ice cream. As more classes are added to the process, the log-likelihood values at convergence (LL) show an improvement in the model fit up to the three-class model for yoghurt. Examining the AIC and BIC numbers in detail suggests that the three-class model is the best option for yoghurt as well since this class model has the lowest AIC and BIC statistics. Including more than three classes leads to increased BIC and AIC values. For yogurt, the three-class model is the most suitable choice, as it has the lowest BIC statistic, and the change in AIC from three to four classes is less significant than the changes between one to two and two to three classes. Comparably, examining the AIC and BIC values for ice cream suggests that the three-class model makes more sense because adding classes beyond the third may not significantly improve the model fit. The change in AIC and BIC is also noticeably smaller for the three to four-class solutions than for the one to two and two-to-three-class solutions. At climax a three-class latent model was developed for each.ii)Preference Heterogeneity Estimates ii)Preference Heterogeneity Estimates Preference Heterogeneity Estimates After identifying the model with the optimal number of classes, the next step is to analyze the utility function and class membership estimates. Table 6, Table 7 present the maximum likelihood estimates for yogurt and ice cream. The variation in significance levels indicates the presence of heterogeneity across the classes. As a result, the hypothesis that consumers' preferences for yogurt and ice cream are influenced by product attributes is confirmed, given that the attributes of yogurt and ice cream significantly impact customer preferences.Table 6Three latent class model: maximum likelihood estimates for yoghurt attributes.Table 6Qualities and VariablesFirst Class (Sceptics)Second Class (Neutrals)Third Class (Advocates)Estimates utility functionVanilla−16.38 (67.98)2.490∗∗∗ (0.0522)1.097∗∗∗ (0.0408)Strawberry−2.565∗∗∗ (0.0518)0.915∗∗∗ (0.0417)0.918∗∗∗ (0.0417)Plastic cup pack−17.77 (96.05)0.716∗∗∗ (0.0217)1.794∗∗∗ (0.0539)Plastic bottle package−17.75 (95.27)−0.288∗∗∗ (0.0381)−1.791∗∗∗ (0.0539)Origin domestic−17.76 (96.00)0.915∗∗∗ (0.0417)0.287∗∗∗ (0.0381)Foreign−0.780∗∗ (0.0977)−0.916∗∗∗ (0.0419)0.358∗∗∗ (0.0683)Price (TZS)−0.0725∗∗ (0.0267)−1.548∗ (0.4338)−1.771∗∗ (0.0132)home-made yoghurt1.249∗∗∗ (0.0237)0.335∗∗∗ (0.0292)−14.69 (26.14)None-constant16.51 (72.60)−16.76 (62.85)−18.10 (.)Class membership estimatesConstant0 (.)0.539∗∗∗ (0.0237)Age: (1 = 18 to 35, 0 = otherwise0.270∗∗∗ (0.0380)0.270∗∗∗ (0.0291)Sex of respondent (1 = Female, 0 = Male)0.878∗∗∗ (0.0414)0.878∗∗∗ (0.0316)Children below 120.843∗∗∗ (0.0411)0.843∗∗∗ (0.0314)Education level (1 > primary level, 0 ≤ primary level)−0.140∗∗∗ (0.0378)−0.139∗∗∗ (0.0289)Income−0.0896∗ (0.0377)−0.0894∗∗ (0.0288)Household-size4.374∗∗∗ (0.170)4.374∗∗∗ (0.130)Family influence (1 = Yes, 0 = N0)0.819∗∗∗ (0.0409)0.819∗∗∗ (0.0312)Government promotion (1 = Yes, 0 = No)0.627∗∗∗ (0.0396)0.627∗∗∗ (0.0302)Food safety (1 = Concerned, 0 = Not concerned)2.947∗∗∗ (0.0867)2.947∗∗∗ (0.0662)Latent class probability0.4990.2500.249Standard error (SE) are enclosed in parentheses. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant variables; n = 11 255.Table 7Three-class latent model: maximum probability approximations for ice cream characteristics.Table 7Attributes/VariablesClass 1 (Sceptics)Class 2 (Neutrals)Class 3 (Advocates)estimates of the utility function's parametersTaste of Vanilla−14.29 (16.87)0.406∗∗∗ (0.0455)1.249∗∗∗ (0.0836)Taste like strawberry−14.21 (16.26)−0.406∗∗∗ (0.0455)1.023∗∗∗ (0.0314)Plastic container−17.31 (76.46)−1.238∗∗ (0.0267)1.599∗∗∗ (0.0795)Bottle-cup−1.565∗∗∗ (0.0518)1.387∗∗∗ (0.0558)1.423∗∗ (0.0241)Domestic−14.59 (19.61)1.259∗∗∗ (0.0436)0.824∗∗∗ (0.0335)Foreign−15.96 (39.03)−1.186∗∗∗ (0.0385)1.043∗∗∗ (0.0175)Price (TZS)−0.0325∗∗ (0.0267)−1.201∗∗ (0.0131)−1.686∗∗∗ (0.0608)Conventional/home-made ice cream0.655∗∗∗ (0.0481)0.278∗∗∗ (0.0253)−16.86 (76.07)None-constant13.21 (13.95)−14.78 (23.37)−17.54 (106.8)Class membership estimatesConstant0 (.)−1.030∗∗∗ (0.0260)Age: (1 = 18 to 35, 0 = Otherwise)−0.270∗∗∗ (0.0269)0.270∗∗∗ (0.0450)Sex of respondent (1 = Female, 0 = Male)0.866∗∗∗ (0.0292)0.866∗∗∗ (0.0489)Children below 120.831∗∗∗ (0.0290)0.831∗∗∗ (0.0485)Education level (1 > primary level, 0 ≤ primary level)−0.130∗∗∗ (0.0267)−0.130∗∗ (0.0447)Income−0.0697∗∗ (0.0267)−0.0697 (0.0446)Household size4.374∗∗∗ (0.120)4.375∗∗∗ (0.201)Family influence (1 = Yes, 0 = No)0.807∗∗∗ (0.0289)0.807∗∗∗ (0.0483)Government-promotion (1 = Yes, 0 = No)0.627∗∗∗ (0.0280)0.627∗∗∗ (0.0468)Food safety (1 = Concerned, 0 = Not concerned)2.950∗∗∗ (0.0613)2.950∗∗∗ (0.103)Latent class marginal probability0.5000.1780.321Normal errors are enclosed in parenthesis. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant factors; n = 11 256. Table 6Three latent class model: maximum likelihood estimates for yoghurt attributes.Table 6Qualities and VariablesFirst Class (Sceptics)Second Class (Neutrals)Third Class (Advocates)Estimates utility functionVanilla−16.38 (67.98)2.490∗∗∗ (0.0522)1.097∗∗∗ (0.0408)Strawberry−2.565∗∗∗ (0.0518)0.915∗∗∗ (0.0417)0.918∗∗∗ (0.0417)Plastic cup pack−17.77 (96.05)0.716∗∗∗ (0.0217)1.794∗∗∗ (0.0539)Plastic bottle package−17.75 (95.27)−0.288∗∗∗ (0.0381)−1.791∗∗∗ (0.0539)Origin domestic−17.76 (96.00)0.915∗∗∗ (0.0417)0.287∗∗∗ (0.0381)Foreign−0.780∗∗ (0.0977)−0.916∗∗∗ (0.0419)0.358∗∗∗ (0.0683)Price (TZS)−0.0725∗∗ (0.0267)−1.548∗ (0.4338)−1.771∗∗ (0.0132)home-made yoghurt1.249∗∗∗ (0.0237)0.335∗∗∗ (0.0292)−14.69 (26.14)None-constant16.51 (72.60)−16.76 (62.85)−18.10 (.)Class membership estimatesConstant0 (.)0.539∗∗∗ (0.0237)Age: (1 = 18 to 35, 0 = otherwise0.270∗∗∗ (0.0380)0.270∗∗∗ (0.0291)Sex of respondent (1 = Female, 0 = Male)0.878∗∗∗ (0.0414)0.878∗∗∗ (0.0316)Children below 120.843∗∗∗ (0.0411)0.843∗∗∗ (0.0314)Education level (1 > primary level, 0 ≤ primary level)−0.140∗∗∗ (0.0378)−0.139∗∗∗ (0.0289)Income−0.0896∗ (0.0377)−0.0894∗∗ (0.0288)Household-size4.374∗∗∗ (0.170)4.374∗∗∗ (0.130)Family influence (1 = Yes, 0 = N0)0.819∗∗∗ (0.0409)0.819∗∗∗ (0.0312)Government promotion (1 = Yes, 0 = No)0.627∗∗∗ (0.0396)0.627∗∗∗ (0.0302)Food safety (1 = Concerned, 0 = Not concerned)2.947∗∗∗ (0.0867)2.947∗∗∗ (0.0662)Latent class probability0.4990.2500.249Standard error (SE) are enclosed in parentheses. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant variables; n = 11 255. Three latent class model: maximum likelihood estimates for yoghurt attributes. Standard error (SE) are enclosed in parentheses. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant variables; n = 11 255. Table 7Three-class latent model: maximum probability approximations for ice cream characteristics.Table 7Attributes/VariablesClass 1 (Sceptics)Class 2 (Neutrals)Class 3 (Advocates)estimates of the utility function's parametersTaste of Vanilla−14.29 (16.87)0.406∗∗∗ (0.0455)1.249∗∗∗ (0.0836)Taste like strawberry−14.21 (16.26)−0.406∗∗∗ (0.0455)1.023∗∗∗ (0.0314)Plastic container−17.31 (76.46)−1.238∗∗ (0.0267)1.599∗∗∗ (0.0795)Bottle-cup−1.565∗∗∗ (0.0518)1.387∗∗∗ (0.0558)1.423∗∗ (0.0241)Domestic−14.59 (19.61)1.259∗∗∗ (0.0436)0.824∗∗∗ (0.0335)Foreign−15.96 (39.03)−1.186∗∗∗ (0.0385)1.043∗∗∗ (0.0175)Price (TZS)−0.0325∗∗ (0.0267)−1.201∗∗ (0.0131)−1.686∗∗∗ (0.0608)Conventional/home-made ice cream0.655∗∗∗ (0.0481)0.278∗∗∗ (0.0253)−16.86 (76.07)None-constant13.21 (13.95)−14.78 (23.37)−17.54 (106.8)Class membership estimatesConstant0 (.)−1.030∗∗∗ (0.0260)Age: (1 = 18 to 35, 0 = Otherwise)−0.270∗∗∗ (0.0269)0.270∗∗∗ (0.0450)Sex of respondent (1 = Female, 0 = Male)0.866∗∗∗ (0.0292)0.866∗∗∗ (0.0489)Children below 120.831∗∗∗ (0.0290)0.831∗∗∗ (0.0485)Education level (1 > primary level, 0 ≤ primary level)−0.130∗∗∗ (0.0267)−0.130∗∗ (0.0447)Income−0.0697∗∗ (0.0267)−0.0697 (0.0446)Household size4.374∗∗∗ (0.120)4.375∗∗∗ (0.201)Family influence (1 = Yes, 0 = No)0.807∗∗∗ (0.0289)0.807∗∗∗ (0.0483)Government-promotion (1 = Yes, 0 = No)0.627∗∗∗ (0.0280)0.627∗∗∗ (0.0468)Food safety (1 = Concerned, 0 = Not concerned)2.950∗∗∗ (0.0613)2.950∗∗∗ (0.103)Latent class marginal probability0.5000.1780.321Normal errors are enclosed in parenthesis. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant factors; n = 11 256. Three-class latent model: maximum probability approximations for ice cream characteristics. Normal errors are enclosed in parenthesis. At the 10 % (p < 0.01), 5 % (p < 0.05), and 1 % (p < 0.001) levels, respectively, single (∗), double (∗∗), and triple (∗∗∗) symbols indicate significant factors; n = 11 256. For example, compared to the other two classes, the results for both dairy products show a significantly favourable flavour (strawberry and vanilla) parameter estimate for class three. This finding agrees with the findings in other studies such as [144,[151], [152], [153]] that revealed strawberry and vanilla as the most preferred flavours for dairy-flavoured products. Similarly, the price results show that class three's parameter estimate is lower than the other two segments for both yoghurt and ice cream, while the alternative estimate for classes one and two's conventional (unprocessed/unpacked) is significantly higher. The relative importance of each attribute was evaluated by calculating the proportion of the difference between the highest and lowest values of a specific attribute in relation to the total sum of the differences between the highest and lowest values of all attributes, following the method proposed by Ref. [50]. To determine which variables should be included in the model as determinants of class membership, multiple likelihood ratio tests across competing models were performed. Due to their normalization during estimation, the class membership estimates for the third class of both dairy products are set to zero. Therefore, class three must be interpreted in relation to the other two classes. The class membership estimates presented in Table 5, Table 6 indicate that consumers' attitudes toward processed dairy products play a significant role in determining the likelihood of being assigned to a particular class. Given that the estimates for processed dairy product-related characteristics are both significant and negative compared to class three, members of class one are likely to be sceptical about both dairy products. For both yogurt and ice cream, the utility function parameter estimates in class one were also negative, indicating that members of class one place less importance on consuming processed dairy products than those in class three. Class two, on the other hand, can be seen as the subjective neutrals toward processed dairy products, as they appear to have a preference for both industrially processed and unprocessed yogurt and ice cream. In contrast, some of the estimates for class three related to processed milk are positively significant for both products, suggesting that this class is more inclined to support processed dairy products. The positive and highly significant class membership estimates for factors such as “reward from using processed dairy products” and “necessity for processed milk products” in relation to yogurt and ice cream indicate that class three values the packaging and sensory aspects of processed dairy products more than class one or class two. These findings are consistent with those reported by Refs. [131,146], and [152]. Based on the latent class probability analysis, Table 6 reveals that 49.9 % of respondents in the yogurt choice experiment were most likely to belong to class one. The table further shows that 25.0 % and 24.9 % of respondents had a higher probability of being in classes two and three, respectively. Class membership estimates suggest that individuals in class one perceive processed yogurt as less safe and less necessary than those in class three. Additionally, class one members exhibit greater scepticism toward processed dairy products compared to class three, and they tend to have a higher likelihood of having children under twelve. The utility function estimates for class one indicate a dislike for traditional (homemade) yogurt, with members in this group identified as general yogurt sceptics due to their more frugal tendencies. Members of class two, on the other hand, prefer inexpensive, home-processed yogurt packaged in paper or plastic cups. They show a strong aversion to imported yogurt and yogurt in plastic bottles. Interestingly, unlike class three, members of class two actually find traditional (homemade) yogurt more appealing, increasing its utility for them. Class two members are more likely to believe in the benefits of both homemade (locally known as mtindi) and industrial yogurt, viewing both as necessary dairy products. Therefore, this group is classified as neutral consumers who support both types of dairy products. Class two members are more likely to be female, prioritize food safety concerns before purchasing, have lower incomes allocated to buying industrially processed yogurt, and have children under twelve. This aligns with findings from other studies, which suggest that yogurt consumption is linked to improved nutrient intake and better diet quality for children (e.g. Refs. [84,154,155],). Overall, members of classes one and two show a greater interest in natural foods and proper eating habits, which explains their preference for both traditional and processed yogurt. In contrast, class three members Favour higher-priced yogurt, with a positive utility for yogurt packaged in plastic or paper cup packs. Their preference for both domestic and international yogurt aligns with findings from previous studies, such as those reported in Germany ([156]). Consumers in the third segment showed a strong preference for yoghurt with flavours like vanilla and strawberry, while also appreciating both imported and local yoghurt. Analysts categorize these individuals as industrial yoghurt enthusiasts or advocates, as they are highly likely to choose processed yoghurt over alternatives and have a strong desire for its attributes. According to the post-estimation analysis in Table 7, 50 % of respondents in the ice cream choice experiment were likely to belong to class one. In contrast, the probability for respondents belonging to classes two and three was 17.8 % and 32.1 %, respectively. For class one, the utility function estimates for yoghurt and ice cream were relatively consistent. Unlike members of class three, individuals in class one view processed dairy products, such as ice cream, as less necessary, less safe, and less satisfying. However, they show a preference for store-bought or homemade ice cream, considering these options more beneficial than the alternatives preferred by class three members. Segment one consumers were more sensitive to price than those in segments two and three, as evidenced by the negative and statistically significant part-worth utility for the price attribute at the 5 % level. This aligns with findings from Refs. [27,157], which highlight price sensitivity among dairy consumers in markets like Bangladesh and China, where financial constraints influence buying decisions. Additionally, these consumers tend to have less confidence in processed milk, and individuals aged 18 to 35 are less likely to belong to this group. Consequently, class one consumers are categorized as sceptics of processed ice cream. Class two ice cream members, compared to class three, show a stronger preference for vanilla-flavoured ice cream. They are more likely to be female, concerned with food safety, and have a higher likelihood of having children under twelve. Class two consumers prefer vanilla-flavoured, locally made ice cream packaged in a bottle-cup. The positive signals for traditional ice cream suggest that this group also leans toward homemade alternatives. However, they dislike imported ice cream and strawberry-flavoured varieties. As such, class two members are classified as “neutral consumers,” supporting both homemade and industrially processed ice cream, representing 17.8 % of the total sample. Overall, consumers in classes two and three share concerns about food safety and a stronger interest in healthy eating. For class three, Table 6 shows that strawberry and vanilla flavours were highly preferred. Members of class three focus heavily on flavour, regardless of price, and have a clear preference for both foreign and local ice cream. They are generally indifferent to packaging and would accept various packaging types, such as plastic cups, over plastic bottles or containers. As with yoghurt, class three members are seen as advocates or enthusiasts of strictly processed ice cream. Certain interactions were found to be significant in relation to the two latent class models, although several of the interactions appeared paradoxical and did not significantly increase the model's AIC. Furthermore, the explanation of each model coefficient changed significantly when an interaction factor was included in the model. To better identify the distinct effects of each variable, analysts decided to exclude interactions for the purposes of this analysis.iii)Marginal Willingness to Pay for Yoghurt and Ice Cream Attributes iii)Marginal Willingness to Pay for Yoghurt and Ice Cream Attributes Marginal Willingness to Pay for Yoghurt and Ice Cream Attributes Table 8 presents the estimates of Marginal Willingness to Pay (MWTP) and the corresponding confidence intervals for the class-specific features of yoghurt and ice cream. Using the Krinsky-Robb parametric bootstrapping method, a 95 % confidence interval was computed, following the approach outlined in Ref. [158]. The MWTP estimates reveal significant variations in consumer preferences across the latent classes, indicating different values placed on yoghurt and ice cream attributes. It is important to note that a higher part-worth utility does not always translate into a higher WTP, as part-worth utility is calculated based on the sum of each participant's part-worth utilities, with most participants belonging to a specific latent class. In contrast, the WTP for a latent class (consumer segment or group) is derived from the proportion of each individual's WTP, where each individual's contribution represents only a fraction of the total class's WTP.Table 8Class-specific attribute MWTP value for yoghurt and ice cream (TZS).Table 8Attributes/VariablesClass 1 (Sceptics)Class 2 (Neutrals)Class 3 (Advocates)YoghurtFlavor VanillaNS34 [2.317–2.496]15.13 [3.157–3.288]Flavor Strawberry−35.38 [-3.428 to −3.197]12.62 [1.496–1.717]12.66 [2.158–2.289]Plastic/paper cupNS9.88 [1.467–1.687]24.74 [4.285–4.397]Plastic bottle packageNS−3.97 [-1.278 to −1.497]24.70 [2.276–3.395]Origin domesticNS12.62 [2.277–2.495]3.96 [0.158–0.289]Foreign−10.76 [-2. 728 to −2. 947]−12.63 [-1.495 to −1.2774.94 [3.289–3.158]Conventional yoghurt17.23 [5.467–5.687]4.62 [2.072–2.480]NSNonconstant (no purchase)NSNSNSIce CreamFlavor VanillaNS12.49 [1.532–2.854]38.34 [2.335–2.793]Flavor strawberryNS−12.49 [1.833–2.967]24.77 [2.456–2.952]Plastic containerNS−38.09 [3.564–2.876]49.20 [4.899–5.688]Plastic-cup bottle−48.15 [-1.278 1.497]42.68 [3.362–3.413]43.78 3.287–3.356]DomesticNS23.98 [2.833–2.57]25.35 [1.174–2.330]ForeignNS−36.49 [-1.753 to −1.634]32.09 [1.214–1.363]Home-made ice cream20.15 [2.456–2.952]8.55 [1.278–1.392]NSNone-constant (no purchase)NSNSNSNote: The 95 % confidence intervals are in brackets and were calculated using the parametric bootstrapping approach with 2,000 replications of the Krinsky and Robb method.NS: The level of an attribute is not statistically significant.Exchange rate: 1TZS = 0.00043 USD. Table 8Class-specific attribute MWTP value for yoghurt and ice cream (TZS).Table 8Attributes/VariablesClass 1 (Sceptics)Class 2 (Neutrals)Class 3 (Advocates)YoghurtFlavor VanillaNS34 [2.317–2.496]15.13 [3.157–3.288]Flavor Strawberry−35.38 [-3.428 to −3.197]12.62 [1.496–1.717]12.66 [2.158–2.289]Plastic/paper cupNS9.88 [1.467–1.687]24.74 [4.285–4.397]Plastic bottle packageNS−3.97 [-1.278 to −1.497]24.70 [2.276–3.395]Origin domesticNS12.62 [2.277–2.495]3.96 [0.158–0.289]Foreign−10.76 [-2. 728 to −2. 947]−12.63 [-1.495 to −1.2774.94 [3.289–3.158]Conventional yoghurt17.23 [5.467–5.687]4.62 [2.072–2.480]NSNonconstant (no purchase)NSNSNSIce CreamFlavor VanillaNS12.49 [1.532–2.854]38.34 [2.335–2.793]Flavor strawberryNS−12.49 [1.833–2.967]24.77 [2.456–2.952]Plastic containerNS−38.09 [3.564–2.876]49.20 [4.899–5.688]Plastic-cup bottle−48.15 [-1.278 1.497]42.68 [3.362–3.413]43.78 3.287–3.356]DomesticNS23.98 [2.833–2.57]25.35 [1.174–2.330]ForeignNS−36.49 [-1.753 to −1.634]32.09 [1.214–1.363]Home-made ice cream20.15 [2.456–2.952]8.55 [1.278–1.392]NSNone-constant (no purchase)NSNSNSNote: The 95 % confidence intervals are in brackets and were calculated using the parametric bootstrapping approach with 2,000 replications of the Krinsky and Robb method.NS: The level of an attribute is not statistically significant.Exchange rate: 1TZS = 0.00043 USD. Class-specific attribute MWTP value for yoghurt and ice cream (TZS). Note: The 95 % confidence intervals are in brackets and were calculated using the parametric bootstrapping approach with 2,000 replications of the Krinsky and Robb method. NS: The level of an attribute is not statistically significant. Exchange rate: 1TZS = 0.00043 USD. Overall, consumers in class one, identified as sceptics, place little value on the processed dairy products studied here. However, they show a preference for traditional, non-industrially processed dairy alternatives. Sceptics believe that the characteristics of processed dairy products reduce their utility and are therefore not highly valued. Class one members place a high value on homemade yoghurt, with a WTP of TZS 17.23 per 500 ml for consuming conventional yoghurt. These sceptic consumers are also willing to pay TZS 10.76 per 500 ml for foreign yoghurt but require compensation of TZS 35.38 per 500 ml for strawberry-flavoured yoghurt. In contrast, consumers in segments two and three are willing to pay a premium for sensory and packaging features due to the high value they place on these attributes. Neutral consumers in class two, however, are less inclined to appreciate yoghurt packaged in bottles and prefer local yoghurt. On the other hand, consumers in segment three place a high premium on packaging. They are willing to pay TZS 27.70 for 500 ml of yoghurt packed in a plastic bottle, compared to TZS 27.74 for the same quantity in a plastic cup. This finding aligns with studies by Refs. [131,148,156], and [159], which highlight that consumers place significant value on packaging and are willing to pay a premium for certain formats. Class three members also value homemade yoghurt and would pay an additional TZS 4.62 for 500 ml of this option. In contrast, advocate consumers in this class place a high value on imported yoghurt, willing to pay TZS 4.94 more for 500 ml of imported yoghurt. Consumers in class three demonstrated a premium WTP for both local and imported yoghurt, while class two consumers showed a preference for domestically made yoghurt. Regarding ice cream, members of classes two and three place higher values on sensory attributes, though there are differences in the specific attributes they value. For instance, neutral consumers in segment two highly value vanilla-flavoured ice cream, willing to pay a premium of TZS 12.49 per 500 g for this flavour. Processed ice cream advocates in class three, however, place a significantly higher value on both vanilla and strawberry-flavoured ice creams, with a willingness to pay TZS 38.34 per 500 g for vanilla-flavoured ice cream and TZS 24.77 for strawberry-flavoured ice cream. This finding corroborates the research by Ref. [153], which indicates that consumers attach significant value to specific ice cream flavours like vanilla and strawberry. Class one sceptics, however, place minimal value on industrially processed ice cream packed in a plastic cup, and they would require compensation of TZS 48 per 500 g for the utility lost by consuming this product. Other attribute levels are not statistically significant in this class. Like yoghurt, sceptic customers have a high regard for homemade ice cream, and they would pay a premium of TZS 20.15 per 500 g for traditional ice cream. Neutral customers in class two show a preference for ice cream packaged in a plastic cup, willing to pay TZS 42.68 per 500 g for this packaging. However, they devalue ice cream packaged in plastic containers, seeking compensation of TZS 38.09 per 500 g for the inconvenience of consuming ice cream in such packaging. Advocate consumers in class three assign premium values to both packaging types, with a willingness to pay as much as TZS 49.20 per 500 g for ice cream in plastic containers and TZS 43.78 per 500 g for ice cream in plastic cups. Additionally, advocate consumers are willing to pay TZS 25.35 for 500 g of domestic ice cream and TZS 32.09 for imported ice cream, reflecting a significant premium value.iv)Customer Segments and Their Particularly Distinguishable Features iv)Customer Segments and Their Particularly Distinguishable Features Customer Segments and Their Particularly Distinguishable Features From a marketing standpoint, it is a standard procedure to separate identifiable group segments from the general population. Target population differentiation is achieved by grouping customers based on common needs, attitudes, lifestyles, and behavioural patterns. The more marketers and producers can precisely customize the offering to match the wants of the client in a way that most appeals to them, the better the firm will perform in terms of its market share. Additionally, by improving their comprehension of their target market, marketers will be able to offer their products more successfully. This is because the marketer will obtain more satisfied customers and a significant competitive advantage by employing the analytical procedure that prioritises customers. The value of various products and services is perceived differently by customers and potential customers. Three customer categories have been determined from the LCM analysis based on this investigation. The following is a description of these identifiable groups along with their unique attributes (see Table 9).•ScepticsTable 9Unique characteristics of consumer segments.Table 9CharacteristicScepticsNeutral ConsumersAdvocate ConsumersSex (%)Female304956Male705144Total100100100Age range (overall mean = 36)>5018–3525–45EducationAbsence of formal education or primarySecondaryHigh School & UniversityHousehold size (Mean = 4)Large (5–7 members)Medium (3–5 members)Small to Medium (3–4 members)Number of children below 123 or more1–21–2Primary OccupationFarming or petty businessMixed (business, employed, farming)Employed or BusinessMonthly Income (TZS)Less than Tsh.500,000/ =<500,0001,000,000–2,500,000500,000 - > 3,000,000Milk product consumption frequencyOccasionally (once a month)WeeklyMost often, every dayProduct PreferenceRaw milk, avoids processed productsBoth raw and processed milk productsProcessed milk products, daily essentialHealth SensitivityHigh, avoid consumerismModerateHigh •Sceptics Sceptics Table 9Unique characteristics of consumer segments.Table 9CharacteristicScepticsNeutral ConsumersAdvocate ConsumersSex (%)Female304956Male705144Total100100100Age range (overall mean = 36)>5018–3525–45EducationAbsence of formal education or primarySecondaryHigh School & UniversityHousehold size (Mean = 4)Large (5–7 members)Medium (3–5 members)Small to Medium (3–4 members)Number of children below 123 or more1–21–2Primary OccupationFarming or petty businessMixed (business, employed, farming)Employed or BusinessMonthly Income (TZS)Less than Tsh.500,000/ =<500,0001,000,000–2,500,000500,000 - > 3,000,000Milk product consumption frequencyOccasionally (once a month)WeeklyMost often, every dayProduct PreferenceRaw milk, avoids processed productsBoth raw and processed milk productsProcessed milk products, daily essentialHealth SensitivityHigh, avoid consumerismModerateHigh Unique characteristics of consumer segments. The results indicated that the sceptics were those who thought eating processed milk products would not be as beneficial. This segment's consumers are characterised by low levels of education. Additionally, they make less than TZS 500,000 per month, which contributes to their dependency on raw milk, which they believe to be reasonably priced and can therefore afford to buy in contrast to processed milk products. “Sceptic” buyers, constitute roughly up 70 % majority of whom were males. The average age for this group was over 50 years, and as they are more health sensitive than consumers in lower age groups, they are less likely to acquire advances, particularly in consumerism. Additionally, they pay the least attention to nutrition and health claims when shopping and have a lower rate of nutritional cognition. “Sceptic” consumers knew less about nutrients and nutritionally prepared milk products.•Neutral (indifferent) consumers •Neutral (indifferent) consumers Neutral (indifferent) consumers Among the three consumer groups, neutral consumers aged 18 to 35 represented the largest share, accounting for 45.0 %. This group also had the highest frequency of weekly milk consumption, regularly drinking both raw milk and industrially processed milk products. More than half of the participants were categorized as “neutral or indifferent,” with a fairly equal split between male and female consumers. Additionally, neutral consumers had completed secondary school education. Within this group, the majority of the monthly household incomes (on average) fell between TZS 1,000,000 and TZS 2,500,000. Unlike other consumer groups, neutral consumers paid relatively little attention to nutritional and health claims when making purchases and had a moderate level of nutritional awareness.•Advocate consumers •Advocate consumers Advocate consumers The majority of “processed milk advocates” are between the ages of 25 and 45 years, with somewhat more women than males. They consume milk frequently and have a moderate to higher income levels (monthly income ranging from TZS 500,000 to above TZS 3,000,000). The majority of “advocate consumers” consider processed dairy products as essential to their everyday existence. The “neutral consumers” had completed high school and university education. Furthermore, they make the most frequent use of nutrition and health claims and have the greatest understanding of nutrients. Additionally, “advocate consumers” are more likely to be cognizant of nutrients and focus their attention on nutrition and health claims when they shop. These customers drink milk more frequently, and out of the three consumer groups, the biggest percentage are those who drink milk daily. Women constitute the majority of “advocate” consumers and that they typically value flavour more than is the case with consumer in other segments.v)Utility and disutility associated with yoghurt and ice cream attributes v)Utility and disutility associated with yoghurt and ice cream attributes Utility and disutility associated with yoghurt and ice cream attributes In terms of the utility gained or lost from characteristics connected to yoghurt and ice cream, consumers behave differently. Regarding yoghurt, homemade yoghurt is the conventional option that even those who are sceptical about industrial yoghurt can benefit from. On the other hand, their usefulness significantly decreases when opting for commercial strawberry-flavoured yoghurt and foreign yoghurt. Analysis of the data shows that while both neutrals and advocates benefit significantly from the sensory aspects of yoghurt, neutrals benefit more from yoghurt with a vanilla flavour than do advocates. While proponents derive benefits from consuming both domestic and imported yoghurt, neutrals only benefit from consuming domestic yoghurt, with the ingestion of foreign yoghurt rendering them useless. On the other hand, proponents of industrial processed yoghurt perceive yoghurt packaged in plastic bottles or cups as decreased in value, whereas neutral customers do not observe this relationship. On the other hand, eating yoghurt that is packaged in a plastic cup provides neutrals with utility (Fig. 6).Fig. 6Positive and negative slope utility associated with yoghurt consumption.Fig. 6 Positive and negative slope utility associated with yoghurt consumption. Aligning this finding with recent empirical studies, we found that they provide valuable insights into how consumers derive utility and experience disutility from different attributes of yoghurt. For yoghurt, the distinction between homemade and commercial varieties is crucial. Consumers often prefer homemade yoghurt due to perceived quality and authenticity, while commercial options, particularly those with flavors like strawberry or those that are foreign, may offer less perceived value. This aligns with findings from studies, such as those by Ref. [160] who highlight that locally processed yoghurt is favored for its perceived quality certificate, followed by nutritional value and flavour. In terms of sensory attributes, research by Ref. [161] shows that consumers' preference for flavors like vanilla is stronger among neutrals compared to advocates of yoghurt. Neutrals derive greater utility from vanilla-flavoured yoghurt, which may be attributed to its broad appeal and mild taste compared to more niche or intense flavors favored by advocates. Regarding packaging, recent research by Ref. [131] suggests that packaging design aligns with consumer preferences, leading to positive purchase attitudes. This supports the notion that packaging affects perceived value differently across consumer segments. These findings underscore the importance of understanding consumer preferences and perceptions regarding yoghurt attributes, which can vary significantly depending on factors such as product origin, flavor, and packaging. Regarding ice cream customers, it is evident from the graphical depiction of utility/disutility (Fig. 7) that sceptics derive satisfaction by opting to consume homemade ice cream instead of commercially processed ice cream. Sceptics believe that the characteristics of industrially manufactured ice cream, along with their corresponding levels, lead to disutility. When it comes to ice cream, neutral consumers view both homemade and commercially processed varieties as useful; nevertheless, they view strawberry-flavoured, imported, and plastic-packaged ice cream as utilitarian. Advocates of industrial ice cream see consumption of both imported and domestic ice cream as beneficial in terms of usefulness. Additionally, this consumer category views sensory qualities (strawberry and vanilla) and packaging (container and cup) as improving in utility.Fig. 7Slope utility linked with ice cream eating, both positive and negative.Fig. 7 Slope utility linked with ice cream eating, both positive and negative. This study contributes to the existing literature on consumer preferences for dairy products by addressing gaps left by prior research. While earlier studies mainly concentrated on individual attributes like price or sensory qualities [36,37,57], our research provides a more comprehensive analysis, examining multiple attributes simultaneously, such as flavor, packaging, country of origin, and price. By conducting a discrete choice experiment with 400 participants, this study offers valuable insights into how these various attributes influence consumer choices within the Tanzanian dairy market. A key contribution of this research is the segmentation of consumers into three distinct groups: “sceptics,” “neutrals,” and “processed milk advocates.” Using latent class analysis, this segmentation uncovers the nuanced preferences and psychographic profiles of each group, which have not been thoroughly explored in the Tanzanian context. While previous studies [37] explored intrinsic and extrinsic factors, our study extends this by linking these preferences to specific consumer segments and their associated psychographic characteristics, including income levels and perceptions of quality. This research underscores the importance of connecting food product attributes with consumer characteristics to better understand preferences across the three identified segments. While some trends align with earlier studies by Refs. [37,162], our findings are distinctive in that they tie these preferences to specific consumer segments and their willingness to pay, offering practical insights for producers and marketers. Nevertheless, there are some limitations to consider when interpreting the findings. The sample size of 400 participants, while informative, may not fully represent the diverse preferences of the broader population. Notably, there was an over-representation of certain demographic groups, such as business professionals and young people, which could skew the results and limit their generalizability to the wider consumer base [163]. Additionally, the fact that 79 % of the sample were self-employed business owners may not accurately reflect the broader occupational landscape in Tanzania. While self-employment is common, especially in the informal sector, national statistics suggest a lower rate of approximately 48 % [25]. This over-representation in the study could be due to the sampling methods, which focused on areas with a high concentration of small businesses. Consequently, the findings may not capture the full diversity of occupations in Dar es Salaam or the country, and thus, caution should be exercised when generalizing the results. Moreover, the study's reliance on self-reported data and hypothetical scenarios could introduce biases, such as social desirability bias or hypothetical bias, where participants' stated preferences may not align with their actual purchasing behaviour in real-world situations. Previous research has shown that consumer intentions expressed in surveys often differ from actual market behaviour ([164]). Additionally, the complexity of the choice experiment, involving multiple attributes and levels, may have overwhelmed some participants, resulting in inconsistent or less reliable responses. This mirrors challenges identified by Refs. [[165], [166], [167]] who noted that multi-attribute scenarios can sometimes confuse consumers. Individuals' stated preferences frequently diverge from their actual behaviour, influenced by psychological factors such as limited self-awareness and the tendency to align with perceived societal expectations. Finally, while latent class analysis is a robust method for identifying distinct consumer segments, it relies heavily on statistical techniques, which may not fully capture the nuances of consumer behaviour, especially those influenced by contextual or situational factors not accounted for in the model ([168]). These limitations suggest areas for future research to explore, potentially offering a more nuanced understanding of consumer preferences in the Tanzanian dairy market. Future research should focus on several critical areas to build on the findings of this study. First, expanding the sample size and ensuring a more representative distribution of demographic factors, such as income, age, and education levels, would strengthen the generalizability of the results ([163]). Additionally, integrating real-world purchase data alongside survey responses could help mitigate biases associated with self-reported data and hypothetical scenarios, offering a more accurate understanding of actual consumer behaviour ([169]). Another important direction for future research is to further investigate the cognitive motivations behind consumer choices for yogurts and ice cream. This could provide deeper insights into the underlying psychological factors influencing preferences, which are not always captured in standard choice experiments. Moreover, future studies should broaden their scope to include rural populations, as the dynamics of processed dairy product availability and consumption in rural areas may differ significantly from urban areas. This would allow for a more comprehensive understanding of consumer preferences across different regions of the country. Scholars should also explore techniques such as “honesty priming” to address potential biases in Discrete Choice Experiments (DCEs), which could improve the accuracy of the findings. In addition, confirming willingness-to-pay (WTP) estimates through incentive-aligned methods could enhance the reliability of the results. Longitudinal studies tracking changes in consumer preferences over time would provide valuable insights into how these preferences evolve in response to shifts in economic, cultural, and market conditions. Lastly, future research should examine how factors influencing consumer preferences and WTP for dairy product attributes vary across different market segments and geographical regions. Such research could offer practical guidance for designing targeted marketing strategies and policies that cater to the distinct needs and preferences of various consumer groups, ultimately enhancing the effectiveness of dairy product marketing and promotion. Policy implications and applications The discrete choice experiment is an attractive tool for research as it provides policy-relevant information and a flexible framework for determining the traits that matter when making decisions and how people might trade-off between attributes. DCEs offer avenues for the simulation of possible scenarios that might be important for marketing and policy actions. The DCE approach is a flexible and useful resource for teaching decision-makers how to plan to solve marketing issues with products. Discrete choice experiments are a rapid and inexpensive survey tool that has several benefits for developing countries where longitudinal product market data are rarely accessible for policymaking. Food selections have a significant impact on overall consumer behaviour, dietary patterns, nutritional intake, satisfaction, and expenses ([64,170] Therefore, it is crucial to comprehend how factors (both internal and external cues), consumers' socioeconomic characteristics, and price fluctuations affect dietary patterns to help producers and policymakers develop and implement persuasive marketing strategies. The popular econometric method for determining subgroup heterogeneity in the population based on several indicator variables is mixed logit and latent class analysis (LCA) ([134,135,170]). By using these two econometric models in this study, it was possible to identify consumer groups with comparable socioeconomic traits, attitudes, practices, and levels of satisfaction by identifying underlying response patterns ([171,172]). Understanding consumer segments is pertinent for policy and marketing strategy decisions. Mixed logit and latent class models’ outputs help producers to produce products based on consumer preference heterogeneity design consumers; class-specific marketing and promotion strategies. Conclusion and policy recommendation The study investigated Dar es Salaam city's customer preferences and WTP for features of dairy products, explicitly yoghurt and ice cream. To investigate preference heterogeneity and sources of heterogeneity, the researchers utilized a DCE and the MLM and LCM, respectively. The MLM highlighted the necessity to consider a variety of factors impacting choice behaviour by revealing preference heterogeneity among consumers, which suggests that not all urban customers favour processed dairy products equally. Three different consumer classes were recognized in the LCM results: those who are neutral towards processed foods, those who support processed dairy products, and those who are sceptical of them. These classes showed differing preferences for the qualities of dairy products according to their socioeconomic status and views on processed meals. Supporters of processed dairy favored flavoured goods in a variety of packaging, but detractors saw little to no benefit in processed dairy. While neutrals were unconcerned, they were considered when advocates made selections about what to buy. The study placed a strong emphasis on the function of attributes and socioeconomic factors in explaining consumer choice behaviour and class membership. Results showed that different customers had different preferences for characteristics of processed dairy products, demonstrating the diversity of urban consumers. This study provides valuable insights into consumer preferences for milk products (yoghurt and ice cream) in the Tanzanian market by identifying three distinct consumer segments: sceptics, neutrals, and advocates. Theoretical implications expand the understanding of consumer behaviour, highlighting that preferences for milk attributes are multifaceted and strongly influenced by product characteristics, as well as psychological factors such as scepticism toward processed products, neutrality, and advocacy for processed milk. These findings align with and extend existing literature, underscoring the importance of considering multiple attributes in models of consumer preference ([40,163,173,174]). The study also offers practical insights for industry stakeholders. Dairy producers and policymakers should consider launching consumer education campaigns to emphasize the benefits of processed milk and to enhance consumers' understanding of the key attributes they seek in dairy products, particularly among sceptical consumers. The research suggests that consumers are willing to pay a premium for attributes that provide greater perceived utility. This offers processors and marketers valuable information on consumer traits and the relative importance placed on specific product attributes. Armed with this knowledge, producers and marketers can adjust their offerings and marketing strategies to better align with consumer demands and expectations. From a policy perspective, the study provides useful information for government investment in the dairy sector. Understanding consumer preferences can help policymakers design policies that align with consumer expectations, potentially fostering growth in the dairy industry. By incorporating these insights into their strategic planning, both industry players and policymakers can work towards expanding and strengthening the dairy market in Tanzania. The study adds to the body of empirical research on consumer behaviour in emerging markets and developing nations. It builds on our understanding of how urban consumers choose dairy products and lays the groundwork for more studies in this area. The application of mixed methods, including the DCE, MLM, and LCM, contributes methodologically. This approach offers a deeper understanding of consumer behaviour than either method alone, emphasizing the importance of capturing preference heterogeneity. Economic actors should develop targeted marketing strategies based on the identified consumer classes. For processed dairy advocates, emphasizing flavors and diverse packaging could be effective, while addressing the concerns of sceptics is crucial for market penetration. Policymakers can consider support measures for the dairy industry, such as incentives for product innovation aligned with consumer preferences. This can contribute to economic growth and sustainability within the sector. Understanding consumers' socioeconomic and product attributes is essential for increasing market share and effectively segmenting markets. This policy proposal highlights the importance of incorporating these findings into strategic planning to enhance the competitiveness and sustainability of Tanzania's dairy industry. Considering Tanzania's evolving industrialization push, further research on consumer preferences and behaviour about other food products should be equally focused. This broader inclusive approach can offer insights into consumer trends and contribute to the general understanding of food consumption patterns. Although the study offers insightful information about Tanzanian consumers' preferences for dairy products, its limitations should be acknowledged, and potential bias should be addressed in future studies to improve the findings' relevance and reliability. The recommendations are meant to serve as a roadmap for policymakers and economic actors as they respond to consumer needs and support the expansion of the dairy industry. CRediT authorship contribution statement Michael L. Kadigi: Writing – original draft, Visualization, Validation, Software, Resources, Project administration, Methodology, Investigation, Funding acquisition, Formal analysis, Data curation, Conceptualization. Damas Philip: Writing – review & editing, Visualization, Validation, Supervision, Project administration, Methodology, Conceptualization. Gilead I. Mlay: Writing – review & editing, Validation, Supervision, Project administration, Methodology, Investigation, Formal analysis, Conceptualization. Ntengua S. Mdoe: Writing – review & editing, Visualization, Validation, Supervision, Methodology, Investigation, Conceptualization. Data and code availability statement The data that has been used is confidential. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.