Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 09-06-2019 12:38 PM
(894 views)

I have 2 datasets. Dataset X looks like this:

```
Jmp_o Nws_r
1 0
0 1
1 1
0 1
0 1
1 0
1 0
... ...
```

I calculate the conditional probability P(jmp_o=1|nws_r=1). There is another dataset Y which is like:

```
Jmp_o Nws_r
1 0
0 0
1 0
0 0
0 0
1 0
1 0
... ...
```

From dataset Y I calculate unconditional probability P(jmp_o=1).

I want to test whether these 2 probabilities are statistically different (by means of p-value).

What test should I perform?

Much thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

So, all you need is dataset X. Run a Fisher test (proc freq) between jmp_o and nws_r. This will tell you wether the two vars are related in your sample.

PG

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

This isn't a case where statistical testing is appropriate. The formulas used are different, so the results are mathematically different.

Statistics would be used only if sampling differences caused different results.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Yes, the two datasets are 2 different samples.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

And they are independent.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@d6k5d3 wrote:

Yes, the two datasets are 2 different samples.

This is not clear to me based upon your original explanation.

Please explain further.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

First I have dataset X from where I calculate the conditional probability. Then from dataset X I create a subsample which has Nws_r=0. After creating dataset Y, I calculate the unconditional probability. Now I need to check whether they are different.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I stick with my previous statement that this is not a case where statistical testing is appropriate.

If you have a sample of people, and you measure their heights in inches, and then you take an independent sample and measure their height in centimeters, you would not do a statistical test to determine if the average height in inches differ from the average height in centimeters. You would just assume they are different because a different measurement was used.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

So, all you need is dataset X. Run a Fisher test (proc freq) between jmp_o and nws_r. This will tell you wether the two vars are related in your sample.

PG

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

Upcoming Events

- Ask the Expert: What are the Top 10 Tips for SAS® Viya® Administrators in 2024? | 25-Jul-2024
- PhilaSUG presents: From Muggles to Macros: Transfiguring Your SAS Programs | 26-Jul-2024
- Westwood SAS User Group presents: A Review of "Free" Massive Open Online Content for SAS Learners | 27-Jul-2024
- Ask the Expert: Using SAS With Microsoft 365: A Programming Approach | 01-Aug-2024
- Ask the Expert: Tricks for Report Builders: Report Design Best Practices | 06-Aug-2024
- SAS Bowl XLII, The SAS Hackathon 2024 | 14-Aug-2024
- Ask the Expert: Top Tips for SAS®9 Programmers Moving to SAS® Viya® | 15-Aug-2024

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.