Statistics With Nabi

Statistics With Nabi Learn Statistics easily through simple and engaging video tutorials for students and researchers.

It's quiz time 🤔
28/04/2025

It's quiz time 🤔

Purpose:R is made mainly for statistics and data analysis.Python is a general-purpose language used for data science, AI...
26/04/2025

Purpose:
R is made mainly for statistics and data analysis.
Python is a general-purpose language used for data science, AI, web development, automation, and much more.

Ease of Use:
R is easier when you’re doing statistical tasks only, but harder for general programming.
Python is easier overall, especially if you want to build full applications or work beyond statistics.

Community and Libraries:
R has a strong academic and research community with libraries like ggplot2, dplyr, and caret.
Python has a massive global community and libraries like pandas, scikit-learn, matplotlib, and tensorflow.

Data Handling:
R is very powerful for data exploration and visualization.
Python is excellent for data manipulation and scalable data pipelines.

Speed and Flexibility:
R can be slower with very large data unless optimized.
Python is faster, more versatile, and better for integrating with other systems (like APIs, databases, and cloud services).

Real-World Use:
R is often used by statisticians, economists, and academics.
Python is the choice for data scientists, AI engineers, software developers, and tech companies — including Facebook (Meta).

25/04/2025

Geometric Mean in R

What is a Confusion Matrix?A confusion matrix is a way to evaluate how well a classification model is performing. It com...
23/04/2025

What is a Confusion Matrix?

A confusion matrix is a way to evaluate how well a classification model is performing. It compares the actual results with the predictions made by the model.

Here are the key terms:

True Positive (TP): The model correctly predicted the positive class.

True Negative (TN): The model correctly predicted the negative class.

False Positive (FP): The model predicted positive, but it was actually negative (a "false alarm").

False Negative (FN): The model predicted negative, but it was actually positive (a "miss").

From these, we calculate performance metrics like:

Accuracy: How often the model is right.

Precision: When it predicts positive, how often is it correct?

Recall: How many actual positives did it catch?

F1 Score: A balance between precision and recall.

In short, a confusion matrix helps you understand where your model is getting confused—and how to improve it!

23/04/2025

Convert Basic Tempurature Celsius to Fahrenheit in R

What is Logistic Regression?Logistic Regression is a statistical method used to predict outcomes that have two possible ...
23/04/2025

What is Logistic Regression?

Logistic Regression is a statistical method used to predict outcomes that have two possible results, like:

Pass or Fail

Yes or No

Buy or Not Buy

Disease or No Disease

It helps us answer questions like:

Will a student pass the exam based on their study hours?

Will a customer buy a product based on their age and income?

Will a patient have a disease based on symptoms?

How Does It Work?

Instead of predicting a number (like marks or salary), logistic regression predicts the probability of something happening — for example, the probability that a student will pass an exam.

The result is always a value between 0 and 1:

A value closer to 1 means higher chance of the event happening

A value closer to 0 means lower chance

Why Not Use Regular (Linear) Regression?

Linear regression can predict values less than 0 or more than 1, which doesn’t make sense when we’re talking about probabilities.

Logistic regression is specially designed to keep the predictions between 0 and 1, so it’s perfect for Yes/No type problems.

Real-Life Examples:

In medicine, to predict if a patient has a disease

In marketing, to find if a customer will respond to an ad

In education, to estimate if a student will pass or fail based on their attendance and study time

In finance, to check the risk of someone defaulting on a loan

In Simple Terms:

Logistic Regression doesn’t just tell you what will happen, it tells you how likely something is to happen, based on the data you have.

21/04/2025

Standard Deviation in R

20/04/2025

Simple Login System in R

20/04/2025

Normal Distribution in R



18/04/2025

Understanding Endogeneity in Regression Analysis

Endogeneity is a common problem in regression models that can lead to biased and inconsistent estimates. It occurs when an explanatory variable is correlated with the error term. This can happen due to omitted variable bias, simultaneity, or measurement error.

In simpler terms, endogeneity means that something inside your model is causing distortion, making it hard to trust your estimated coefficients.

Why does it matter?
If not addressed properly, endogeneity can invalidate your research findings or policy recommendations.

How to fix it?
Techniques like Instrumental Variables (IV), Two-Stage Least Squares (2SLS), and Fixed Effects models are often used to deal with endogeneity.

Stay tuned to learn how to detect and solve endogeneity problems in real datasets using statistical software like R and SPSS.

Understanding Scatter Diagrams & Types of CorrelationA scatter diagram is a powerful visual tool in statistics that help...
18/04/2025

Understanding Scatter Diagrams & Types of Correlation

A scatter diagram is a powerful visual tool in statistics that helps us understand the relationship between two variables — usually X and Y.

This image beautifully illustrates different types of correlations that can exist between two variables:

1. Perfect Positive Correlation
All points lie exactly on a straight line going upwards — as X increases, Y increases perfectly.

2. Perfect Negative Correlation
All points lie on a straight line going downwards — as X increases, Y decreases perfectly.

3. High Degree of Positive Correlation
Points are close to a straight line sloping upward — strong positive relationship.

4. High Degree of Negative Correlation
Points are close to a straight line sloping downward — strong negative relationship.

5. Low Degree of Positive Correlation
Points are scattered but tend to move upward — weak but positive relationship.

6. Low Degree of Negative Correlation
Points are scattered with a downward trend — weak negative relationship.

7. No Correlation
Points are scattered randomly with no clear pattern — no relationship between X and Y.

17/04/2025

Histogram by groups in R using ggplot2 package









Address

Peshawar

Website

Alerts

Be the first to know and let us send you an email when Statistics With Nabi posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share