<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I count defects in a process defined by multiple column means and standard deviations? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/682860#M86847</link>
    <description>&lt;P&gt;Assuming that your first Work Stream column are called "WS1Pressure" and "WS1Time"&amp;nbsp; The following script will create a new column that has the value of 1 when a defect for a given rows is found, and 0 when it is not.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "WS1 Defect",
	formula(
		As Constant(
			WS1PressureMean = Col Mean( :WS1Pressure );
			WS1PressureSTD = Col Std Dev( :WS1Pressure );
			WS1PressureLimit = WS1PressureMean + 5 * WS1PressureSTD;
			WS1TimeMean = Col Mean( :WS1Time );
			WS1TimeSTD = Col Std Dev( :WS1Time );
			WS1TimeLimit = WS1TimeMean + 5 * WS1TimeSTD;
		);
		If( :WS1Pressure &amp;gt; WS1PressureLimit &amp;amp; :WS1Time &amp;gt; WS1TimeLimit,
			1,
			0
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you replicate this code for the other 3 Work Streams, you can then use the Summary or Tabulate platforms to do your summaries of all of the defects found.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 03:33:34 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-10-02T03:33:34Z</dc:date>
    <item>
      <title>How do I count defects in a process defined by multiple column means and standard deviations?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/679686#M86584</link>
      <description>&lt;P&gt;Data table is 180K rows.&amp;nbsp; Data is operational recorded data for a steady state process.&amp;nbsp; Four columns measure the pressure in four separate workstreams of the process.&amp;nbsp; Four columns measure the time to create the pressure in the four separate workstreams of the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each workstream, its mean and standard deviation are required, for both pressure and time, to define a threshold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each workstream, a count must be registered when pressure is greater than 5X the workstream's standard deviation added to the workstream's mean.&amp;nbsp; Similarly, a count must be registered when time is 5X&amp;nbsp;the workstream's standard deviation added to the workstream's mean.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, if BOTH pressure AND time exceed those workstream limits, a defect must be registered.&amp;nbsp; Pressure AND time must both exceed their individual thresholds to define a defect in this process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to create a script or a process to automate these evaluations, so that for each 180K row data file the final defect count can be made?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:23:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/679686#M86584</guid>
      <dc:creator>Victor60</dc:creator>
      <dc:date>2023-09-20T15:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count defects in a process defined by multiple column means and standard deviations?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/682850#M86844</link>
      <description>&lt;P&gt;You have provided very detailed analysis sequence to produce the result that you want.&lt;/P&gt;&lt;P&gt;I think it is possible through scripting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you want to test a reduce data set first (say 1000 rows with all those 4 columns) using JMP GUI.&lt;/P&gt;&lt;P&gt;Turn-on the workflow (JMP 17 onwards) while you are doing that.&lt;/P&gt;&lt;P&gt;Tabulate/Summarize (mean / std dev) --&amp;gt; JOIN --&amp;gt; Add count formula column with condition:&amp;nbsp; if time is 5x std + mean&amp;nbsp; --&amp;gt; Add logic formula column (AND)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After you are satisfied with your results, tweak your script for automation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 02:11:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/682850#M86844</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2023-10-02T02:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count defects in a process defined by multiple column means and standard deviations?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/682860#M86847</link>
      <description>&lt;P&gt;Assuming that your first Work Stream column are called "WS1Pressure" and "WS1Time"&amp;nbsp; The following script will create a new column that has the value of 1 when a defect for a given rows is found, and 0 when it is not.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "WS1 Defect",
	formula(
		As Constant(
			WS1PressureMean = Col Mean( :WS1Pressure );
			WS1PressureSTD = Col Std Dev( :WS1Pressure );
			WS1PressureLimit = WS1PressureMean + 5 * WS1PressureSTD;
			WS1TimeMean = Col Mean( :WS1Time );
			WS1TimeSTD = Col Std Dev( :WS1Time );
			WS1TimeLimit = WS1TimeMean + 5 * WS1TimeSTD;
		);
		If( :WS1Pressure &amp;gt; WS1PressureLimit &amp;amp; :WS1Time &amp;gt; WS1TimeLimit,
			1,
			0
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you replicate this code for the other 3 Work Streams, you can then use the Summary or Tabulate platforms to do your summaries of all of the defects found.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 03:33:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-count-defects-in-a-process-defined-by-multiple-column/m-p/682860#M86847</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-10-02T03:33:34Z</dc:date>
    </item>
  </channel>
</rss>

