• Data Pragmatist
  • Posts
  • Mann–Whitney U and Distinction between ChatGPT and Bard

Mann–Whitney U and Distinction between ChatGPT and Bard

Must Read for data scientist and Amazon's Entry into AI wars.

Welcome to this edition of the Data Pragmatist, your dose of all things data science and AI. A warm welcome to the 438 new members who joined our community of over 9,000 data professionals since Monday.

📖 Estimated Reading Time: 4 minutes. Missed our previous editions? Catch up on some insightful reads here:

Today we are talking about The Mann–Whitney U Test is a nonparametric test of the null hypothesis that two independent samples are drawn from populations with the same distribution. As part of our learning series, I have provided some free articles to gather knowledge about data science. As now-a-days ChatGPT is in the news, I hereby, provide you with the distinction between ChatGPT and its competition Bard. Do follow us on Linkedin and Twitter for more real-time updates.

Sponsored
CanifiEmpowering innovators and AI enthusiasts: Discover how to harness AI, tackle challenges, enhance productivity, and get inspired.

Hot News: Amazon Invests $4 Billion in Anthropic for AI Dominance

Amazon.com Inc. plans to invest up to $4 billion in Anthropic, a significant move in its pursuit of a prominent role in generative artificial intelligence. Anthropic will shift its software to Amazon Web Services data centers and utilize Amazon's custom chips for model training, particularly for chatbots and other applications. This partnership not only grants Anthropic access to Amazon's computing capabilities but also provides essential financial support for the extensive expenses associated with running large AI models. So the AI war is getting intense or is it just a name change to already existing cloud wars.

🧠 Featured Concept: The Mann–Whitney U Test

The Mann–Whitney U test, also known as the Wilcoxon rank-sum test, is a nonparametric test of the null hypothesis that two independent samples are drawn from populations with the same distribution. It is a rank-based test, which means that it does not make any assumptions about the distribution of the data. This makes it a useful test for data that is not normally distributed, or for data that is on an ordinal scale.

Applications of the Mann–Whitney U Test

The Mann–Whitney U test can be used in a variety of settings, including:

  • Comparing the effectiveness of two different treatments: For example, a researcher might use the Mann–Whitney U test to compare the effectiveness of two different drugs for treating a particular disease.

  • Comparing the performance of two different groups: For example, a researcher might use the Mann–Whitney U test to compare the performance of two different sports teams on a particular measure, such as points scored per game.

  • Comparing the attitudes or opinions of two different groups: For example, a researcher might use the Mann–Whitney U test to compare the attitudes of men and women towards a particular issue.

Assumptions of the Mann–Whitney U Test

The Mann–Whitney U test makes the following assumptions:

  • The two samples are independent.

  • The data is at least ordinal level.

How to Perform the Mann–Whitney U Test

To perform the Mann–Whitney U test, you first need to combine the two samples and rank all of the data points. If there are any tied values, you can assign them the average of the ranks they would have received if they were not tied.

Once you have ranked the data, you need to calculate the Mann–Whitney U statistic for each group. The Mann–Whitney U statistic is calculated as follows:

U = n1 n2 - n1 (n1 + 1) / 2 - R1

where:

  • n1 is the sample size of group 1

  • n2 is the sample size of group 2

  • R1 is the sum of the ranks for group 1

Once you have calculated the Mann–Whitney U statistic for each group, you can look up the p-value in a table of critical values. The p-value is the probability of obtaining a Mann–Whitney U statistic as extreme or more extreme than the one you observed, assuming that the null hypothesis is true.

Interpreting the Results of the Mann–Whitney U Test

If the p-value is less than the significance level (typically 0.05), then you reject the null hypothesis and conclude that the two samples are drawn from populations with different distributions.

If the p-value is greater than or equal to the significance level, then you fail to reject the null hypothesis and cannot conclude that the two samples are drawn from populations with different distributions.

Example of a Mann–Whitney U Test

Suppose a researcher is interested in comparing the effectiveness of two different drugs for treating a particular disease. The researcher recruits 10 participants and randomly assigns them to receive either drug A or drug B. After 6 months of treatment, the researcher measures the improvement in each participant's condition.

The following table shows the improvement scores for the two groups:

To compare the effectiveness of the two drugs, the researcher uses the Mann–Whitney U test. The researcher first combines the two samples and ranks all of the improvement scores. There are no tied values, so the ranks are as follows:

Next, the researcher calculates the Mann–Whitney U statistic for each group. The Mann–Whitney U statistic for drug A is 17, and the Mann–Whitney U statistic for drug B is 33.

Finally, the researcher looks up the p-value in a table of critical values. The p-value for a Mann–Whitney U statistic of 17 is 0.025, and the p-value for a Mann–Whitney U statistic of 33 is 0.25.

Since the p-value for drug A is less than the significance level, the researcher concludes that there is a statistically significant difference between the groups treated with drug A compared to the control group. On the other hand, the p-value for drug B is greater than the significance level, indicating that there is no statistically significant difference between the groups treated with drug B and the control group. Thus, drug A shows a significant effect, while drug B does not. The researcher may then recommend further studies or potential applications based on these findings.

Bard vs. ChatGPT: A Comprehensive Comparison

In the rapidly evolving world of artificial intelligence, two generative AI products have captured the attention of businesses and developers alike: ChatGPT and Google Bard. These cutting-edge AI tools are designed to respond to user prompts without human intervention, opening up a world of possibilities for content creation, research, and communication. But which one is the better choice for your specific needs? In this article, we'll delve into the details of Bard vs. ChatGPT, comparing them across various performance areas, pricing, and pros and cons to help you make an informed decision.

What are ChatGPT and Google Bard?

ChatGPT is developed by OpenAI and utilizes the Microsoft supercomputing platform for its operations. It relies on a vast language model, GPT-3.5, trained on a diverse dataset comprising sources like Wikipedia, scientific journals, and news articles up to September 2021. While the basic version is free, ChatGPT Plus, priced at $20 per month, offers enhanced features and capabilities, including faster response times and priority access during peak periods.

Google Bard, on the other hand, is a product of Google and was introduced shortly after ChatGPT. Bard is powered by the Pathways Language Model (PaLM 2) and is trained on Infiniset, a curated collection of internet content. Bard is currently available for free to users with eligible Google accounts, with no limit on the number of messages sent per day. The future pricing structure of Bard remains uncertain.

Decipher Bard vs. ChatGPT here.

How did you like today's email?

Login or Subscribe to participate in polls.

If you are interested in contributing to the newsletter, respond to this email. We are looking for contributions from you — our readers to keep the community alive and going.