/*! For license information please see dll.226.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[226],{3440:function(e,t,a){"use strict";a.r(t);var n=a(14),l=a.n(n),i=a(12),r=a.n(i),u=a(10),o=a.n(u),s=a(15),c=a.n(s),d=a(16),f=a.n(d),p=a(8),m=a.n(p),h=a(7),v=a.n(h),y=a(0),E=a.n(y),g=a(1),w=a.n(g),T=a(86),S=a(75),b=a(66),C=a(965),D=a(204),R=a(203),_=a(362),A=a(1824),V=a(200),k=a(991);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=m()(e);if(t){var l=m()(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return f()(this,a)}}var M=function(e){c()(a,e);var t=q(a);function a(e){var n;return l()(this,a),n=t.call(this,e),v()(o()(n),"calculateMeanTest",(function(){var e=n.props,t=e.data,a=e.showDecision,l=n.state,i=l.variable,r=l.type,u=l.mu0,o=l.direction,s=l.alpha,c=l.stdev,d=E.a.createElement(A.default,{data:t,variable:i,showDecision:a,mu0:u,direction:o,stdev:c,type:r,alpha:s});n.props.logAction(V.DATA_EXPLORER_TESTS_MEAN,{variable:i,mu0:u,direction:o,alpha:s,type:r,stdev:c,showDecision:a}),n.props.onCreated(d)})),n.state={type:"T Test",variable:null,mu0:0,direction:"two-sided",alpha:.05,stdev:null},n}return r()(a,[{key:"renderInputs",value:function(){var e=this,t=this.props.quantitative;return E.a.createElement(y.Fragment,null,E.a.createElement(R.default,{legend:"Type of Test:",defaultValue:this.state.type,options:["T Test","Z Test"],onChange:function(t){e.setState({type:t})}}),E.a.createElement(R.default,{legend:"Variable:",defaultValue:null,options:t,onChange:function(t){e.setState({variable:t})}}),"Z Test"===this.state.type?E.a.createElement(D.default,{legend:"Standard Deviation",defaultValue:this.state.stdev,step:"any",min:0,onChange:function(t){e.setState({stdev:t})},inputStyle:{width:140}}):null,E.a.createElement(C.default,null,E.a.createElement(b.default,null,E.a.createElement(D.default,{legend:E.a.createElement("span",null,E.a.createElement(_.default,{raw:"H_0"})," mean value (",E.a.createElement(_.default,{raw:"\\mu_0"}),")"),defaultValue:this.state.mu0,step:"any",onChange:function(t){e.setState({mu0:t})}})),E.a.createElement(b.default,null,E.a.createElement(D.default,{legend:E.a.createElement("span",null,"Significance level ",E.a.createElement(_.default,{raw:"\\alpha"})),defaultValue:this.state.alpha,min:0,max:1,tooltipPlacement:"left",step:"any",onChange:function(t){e.setState({alpha:t})}}))),E.a.createElement(R.default,{legend:"Direction:",defaultValue:this.state.direction,options:["less","greater","two-sided"],onChange:function(t){e.setState({direction:t})},menuPlacement:"top"}))}},{key:"render",value:function(){return E.a.createElement(T.default,{style:{fontSize:"14px"}},E.a.createElement(T.default.Header,{as:"h4"},"One-Sample Mean Test",E.a.createElement(k.default,{title:"One-Sample Mean Test",content:"A test for the mean of a quantitative variable."})),E.a.createElement(T.default.Body,null,this.renderInputs(),E.a.createElement(S.default,{variant:"primary",block:!0,onClick:this.calculateMeanTest,disabled:!this.state.variable},"Calculate")))}}]),a}(y.Component);M.defaultProps={logAction:function(){},showDecision:!0},M.propTypes={quantitative:w.a.array.isRequired,data:w.a.object.isRequired,logAction:w.a.func,onCreated:w.a.func.isRequired,showDecision:w.a.bool},t.default=M}}]);